Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lloyd709

macrumors 6502
Original poster
Jan 10, 2008
312
0
I've just started to learn Applescript and wrote the following script to try and get Photoshop to adjust an image and save it under a new name in the same directory. However, on running the script it adjusts the image OK but leaves me with a 'save as' screen with the file name the same as the old file. I've looked up many example save scripts and seem to be following the syntax correctly (but clearly not). The problem is with the save command. Any ideas where I'm going wrong?

tell application "Adobe Photoshop CS4"
open {file "Jobs:Live:page2_3.PSD"}
resize canvas of the current document width 40.3 height 30 anchor position middle left
save current document in file "Jobs:Live:webPage.jpg" as JPEG
end tell
 

lloyd709

macrumors 6502
Original poster
Jan 10, 2008
312
0
I've worked out what the problem was - I simply needed to flatten the image first. Photoshop couldn't save the file as a JPG as it had layers!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.