Re: GUI scripting Flash (julifos)
Re: GUI scripting Flash (julifos)
- Subject: Re: GUI scripting Flash (julifos)
- From: Nate Battles <email@hidden>
- Date: Tue, 14 Apr 2009 09:25:56 -0500
- Thread-topic: GUI scripting Flash (julifos)
Thank you for the advice! I found and modified a JSFL that worked
perfectly! Let me know if you would like me to post it, it's amazing. I
think you're right, by combining AppleScript and JSFL, I can now automate
much of this process and save so much time and wrist strain :)
Thanks again to everyone who helped.
~N
On 4/13/09 2:00 PM, "email@hidden"
<email@hidden> wrote:
> Send AppleScript-Users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AppleScript-Users digest..."
>
>
> Today's Topics:
>
> 1. Re: GUI scripting Flash (julifos)
> 2. Remote Apple Events issues (Rob Lewis)
> 3. Re: Re: GUI scripting Flash (Stockly, Ed) (Nate Battles)
> 4. Re: GUI scripting Flash (Stockly, Ed) (Yvan KOENIG)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 12 Apr 2009 21:36:35 +0200
> From: julifos <email@hidden>
> Subject: Re: GUI scripting Flash
> To: applescriptmaillist <email@hidden>
> Message-ID: <C6080F63.FEE1%email@hidden>
> Content-Type: text/plain; charset="US-ASCII"
>
>> I'm trying to script some processes inside Adobe Flash.
>>
>> 1. open a new flash file
>> 2. import selected art to the Flash library
>> 3. Set properties of imported art to movie clips
>> 4. then set linkage properties to export for actionscript
>
> I don't have the time now to ellaborate, but this is what I use to do in
> order to automate Flash IDE tasks with a mix of AppleScript and JSFL (Flash
> JavaScript, Flash' own automation language, very similar to
> actionscript/javascript): as a general rule, write some JSFL commands to a
> temporary ".jsfl" text file and then tell Finder to open them using Flash.
>
> According to your needs, I would:
> -Tell app Finder to open JSFL file which creates a new document.
> -Tell app Finder to open art file using Flash.
> -Tell app "System Events" to keystroke return (usually the only way to
> dismiss the "import options" dialog, as for CS3).
> -Tell app Finder to open JSFL file which converts selection into movie clip
> and sets its linkage properties, save, publish and close doc.
>
> If you get tired of AppleScript's UI scripting for Flash, search the web for
> JSFL or see "extending flash" in the Flash IDE help or Adobe's Flash forums.
>
> jj
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 12 Apr 2009 13:18:31 -0700
> From: Rob Lewis <email@hidden>
> Subject: Remote Apple Events issues
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> Trying to do a very simple thing: let one Mac on my LAN change tracks
> on iTunes running on another Mac.
>
> This oughta do it, right?
>
> using terms from application "iTunes"
> tell application "iTunes" of machine "eppc://
> user:email@hidden"
> next track
> end tell
> end using terms from
>
> I know the account on AnotherMac is logged in and iTunes is running,
> and remote Apple Events are enabled. But I just get errors like
> "remote access isn't allowed" or "unable to authenticate user" or a
> password request dialog with a completely different user account name
> filled in.
>
> Why is this a problem? I read on some old web page that the target
> account has to be an administrator on the remote machine; is this
> true? Bad news if so.
>
> I want this to work without any need to input passwords etc.
>
> Any tips appreciated.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.apple.com/mailman/private/applescript-users/attachments/20090412/
> 17d84872/attachment.html
>
> ------------------------------
>
> Message: 3
> Date: Mon, 13 Apr 2009 10:06:13 -0500
> From: Nate Battles <email@hidden>
> Subject: Re: Re: GUI scripting Flash (Stockly, Ed)
> To: <email@hidden>
> Message-ID: <C608BF15.22CB%email@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> 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
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.apple.com/mailman/private/applescript-users/attachments/20090413/
> 73322ed8/attachment.html
>
> ------------------------------
>
> Message: 4
> Date: Mon, 13 Apr 2009 17:50:31 +0200
> From: Yvan KOENIG <email@hidden>
> Subject: Re: GUI scripting Flash (Stockly, Ed)
> To: liste AppleScript US <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed
>
>
> 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)
>
> ------------------------------
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/applescript-users
>
> End of AppleScript-Users Digest, Vol 6, Issue 170
> *************************************************
_______________________________________________
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