Re: Re: GUI scripting Flash (Stockly, Ed)
Re: Re: GUI scripting Flash (Stockly, Ed)
- Subject: Re: Re: GUI scripting Flash (Stockly, Ed)
- From: Nate Battles <email@hidden>
- Date: Mon, 13 Apr 2009 10:06:13 -0500
- Thread-topic: GUI scripting Flash (Stockly, Ed)
Title: Re: Re: GUI scripting Flash (Stockly, Ed)
Thank you Ed. Flash is barely AppleScriptable, there's only one class in it's dictionary. The infinite loop worked very fast, but obviously keeps going. I tired the Finder, selected items tell, but now its stopping after the 1st return. I'm very new at this and perhaps I'm placing this in the wrong block:
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...")
Any help would be much appreciated.
~Nate
On 4/11/09 2:00 PM, "email@hidden" <email@hidden> wrote:
> Re: GUI scripting Flash (Stockly, Ed)
> I'm trying to script some processes inside Adobe Flash.
>...depending on how many art files I have to import, can I set a x value or
infinite value for repeat keystroke return?
Yes. This is what I would do:
tell application "Finder"
set selectedItems to the selection
end tell
set itemCount to count selectedItems
-- then, inside your system events tell---
repeat itemCount times
delay 1
keystroke return
end repeat
Or, if you prefer an infinite loop:
Repeat
delay 1
keystroke return
end repeat
> This is my first post. Should I post my script as I have it thus far?
Not needed, just post the parts you need help with. I don't have Flash, is
it totally non-AppleScriptable?
HTH,
ES
_______________________________________________
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