Ich muss öfter einzelne Objekte aus Photoshop-Dateien kopieren und separat speichern. Da ein Rechtsklick auf die Ebene, Ebene kopieren in neues Dokument, Menü bearbeiten -> zuschneiden -> Menü fürs Web Speichern, auf Dauer ganz schön aufwendig ist.:
--© hubionmac.com 25.03.2015
tell application "Adobe Photoshop CS6"
set orig to current document
tell orig
set x to width
set y to height
set currentlayert to current layer
end tell
set newdoc to make new document with properties {width:x, height:y}
set current document to orig
tell current document
duplicate current layer to newdoc
end tell
set current document to newdoc
tell newdoc
delete last layer
end tell
trim newdoc basing trim on transparent pixels
set current document to newdoc
activate
tell application "System Events"
keystroke "s" using {command down, shift down, option down}
end tell
end tell