On 2 Jun 2005, at 13:49, Ruby Madraswala wrote: I have tried 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 file names 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 -- change back to 7.0 tell application "Adobe Photoshop CS" open file dnm 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 the doc close docRef without saving end tell end if end repeat end tell
Should work OK now.
Regards |