• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
newbie question on calling handlers and scope
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newbie question on calling handlers and scope


  • Subject: newbie question on calling handlers and scope
  • From: "Andrew T. Lynch" <email@hidden>
  • Date: Wed, 23 Jun 2004 08:00:35 -0700

Hi,
I run this script:

on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars

on run
tell application "iView MediaPro"
tell window 1
set theCount to the count of every media item
repeat with i from 1 to theCount
set theItem to media item i
set thePath to the path of theItem
set thePath to replace_chars(thePath, "Porta60", "Media:Pictures")
set the path of theItem to thePath
end repeat
end tell
end tell
end run

and get an error: iView MediaPro got an error: window 1 doesn't understand the replace_chars message.

How do I call a handler from within a tell block?

- Andrew T. Lynch
- Chief Zymurgist
- Verisity Design Inc.
- (650)934-6875
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: newbie question on calling handlers and scope
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: RE: CD drive opener -- OS 9
  • Next by Date: Possible Help with a Project
  • Previous by thread: Re: Read resource forks wit applescript
  • Next by thread: Re: newbie question on calling handlers and scope
  • Index(es):
    • Date
    • Thread