MACSCRPT Archives

October 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Levon Spradlin <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 17 Oct 2007 13:29:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
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
[log in to unmask]

• "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 material confidential to
Pearson.  If you were not an intended recipient, 
please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

ATOM RSS1 RSS2