Thanks for taking the time..
First error message I get at “set
docRef to current document”
Expected “given”, “with”,
“without”, other parameter name etc. but found identifier.
Second at Jpeg save options
Expected end of line etc, but found class
name
Ruby
From:
applescript-users-bounces+rubym=email@hidden
[mailto:applescript-users-bounces+rubym=email@hidden] On Behalf Of Martin Orpen
Sent: Thursday, June 02, 2005 9:13
AM
To:
email@hidden
Subject: Re: EPS to JPEG
On 2 Jun 2005, at 13:49, Ruby Madraswala wrote:
Set foo to current document --- gives me an error message
"expected end of line, but found class name"
I've run your script through CS and it works fine in this format:
-- changed the folder ref from your original
set xxyy to choose folder
tell application "Finder"
set
flist to every file in folder xxyy
repeat
with
curfile in flist
set
nm to name of curfile as string
set
dnm to curfile as string
-- note folder is changed to string
set
newfile to (xxyy as string) & characters 1 thru 5 of nm &
"cc.jpg"
if
nm contains
".eps" then
tell application "Adobe Photoshop CS"
set docRef to current document
-- mate replaced with matte :-)
set myOptions to {class:JPEG save options, embed color profile:false, format options:standard, matte:background color matte}
-- you need to use copying otherwise you'll get a dialog box
save docRef
in file newfile as JPEG
with options myOptions with copying
close docRef
without
saving
Should work OK now.