newbie question on calling handlers and scope
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.