Newbie to AppleScript but not to Photoshop. Trying to expedite tedious, repetitive tasks for more efficiency. Working in Photoshop CC 2014, RGB document with masks (as separated channels) that I am writing a script to: load seven separated channels as seven separate selections, crop to the selection seven times and export / save the seven selections as separate web-ready .jpegs. I have scoured the Internet and have come up with this:
tell application "Adobe Photoshop CC 2014"
activate
tell current document
load selection of it from channel 5 of it
set theCropBounds5 to bounds of selection
crop bounds theCropBounds5
set myFile to "OS X 10.8.5 US:Users:myName:Desktop:myBanners"
set myOptions to {class:JPEG save options, embed color profile:true, format options:standard, matte:background color matte, quality:12}
save current document in file myFile as JPEG with options myOptions
end tell
end tell
Loading the channel and cropping to the selection works fine but I think my export / saving commands (and perhaps file set up, too) are incomplete and probably inaccurate because the script throws an error at “save current document”: “Adobe Photoshop CC 2014 got an error: File/Folder expected” number 1230"
Would love direction on 2 things: 1- how to write the script so that the selections will save as separate files and 2 - how to repeat this code for all 7 selections in one script (for efficiency’s sake). Thanks!
Model: MacBook Pro
Browser: Safari 537.36
Operating System: Mac OS X (10.8.5)