ActionScript called by AppleScript in ImageReady CS2 fail close window
ActionScript called by AppleScript in ImageReady CS2 fail close window
- Subject: ActionScript called by AppleScript in ImageReady CS2 fail close window
- From: Levon Spradlin <email@hidden>
- Date: Wed, 17 Oct 2007 13:29:02 -0500
- Thread-topic: ActionScript called by AppleScript in ImageReady CS2 fail close window
Title: ActionScript called by AppleScript in ImageReady CS2 fail close window
I am trying to script ImageReady CS2. I know it is very limited, but I have an ActionScript that works fine to do what I need. I can call on the ActionScript without error, but I can not get ImageReady to close the file. I have tried a variety of locations and syntax to no avail. I hope I am not asking for too much from AppleScript on this one, it seems simple. System Events should be able to handle this, but fails in ImageReady where other apps handle the command just fine. Any thoughts?
thanks,
Levon
[applescript]
set FileSample to choose folder with prompt "Please select an input folder."
set folderName to name of (info for FileSample)
tell application "Finder" to set theFiles to files of folder FileSample whose name extension is in {"eps", "psd"} or kind contains "Adobe Photoshop EPS file" or kind contains "EPS" or kind contains "Photoshop" or kind contains "PSD"
repeat with oneFile in theFiles
tell application "Adobe ImageReady CS2"
activate
open (oneFile as alias)
tell front document
do script "Save as GIF Optimized" with delay 1
tell application "System Events" to keystroke "w" using command
end tell
end tell
end repeat
[/applescript]
Levon Spradlin
Technology Manager, Desktop Publishing Support Services
Pearson | Assessment & Information
512-989-5300 x 3989
email@hidden
"We may go to the moon, but that's not very far. The greatest distance we have to cover still lies within us." Charles de Gaulle
****************************************************************************
This email may contain confidential
material. If you were not
an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
***************************************************************************
_______________________________________________
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