Re: GUI scripting Flash (Stockly, Ed)
Re: GUI scripting Flash (Stockly, Ed)
- Subject: Re: GUI scripting Flash (Stockly, Ed)
- From: Yvan KOENIG <email@hidden>
- Date: Mon, 13 Apr 2009 17:50:31 +0200
Le 13 avr. 2009 à 17:06, Nate Battles a écrit :
on do_submenu(app_name, menu_name, menu_item, submenu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "Finder"
set selectedItems to the selection
end tell
set itemCount to count selectedItems
tell application "System Events"
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu menu_name
tell menu item menu_item
tell menu menu_item
click menu item submenu_item
delay 5
keystroke return
delay 5
repeat itemCount times
delay 1
keystroke return
end repeat
end tell
end tell
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_submenu
do_submenu("Adobe Flash CS3", "File", "Import", "Import to
Library...")
(1) are you sure that the menu item is correctly spelled ?
You are using three period characters when it may be the ellipsis one.
(2) 'delay 5' seems to be huge
'delay .5' would be sufficient.
(3) last not least, your code is not passing the pathnames to the
application so this one will not treat them.
Yvan KOENIG (from FRANCE lundi 13 avril 2009 17:48:53) _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden