A recent project required the creation of a couple dozen AppleScript routines for Adobe Photoshop CS2. We've posted a few of them for you to download — free of charge.
Each script has been written as a subroutine, returning "OK" or an error. You may call these routines a few different ways. Below, you will find two of my preferred methods:
if my <name of subroutine>()≠"OK" then
--handle error
end if
set myResult to my <name of subroutine>()
--then evaluate the result
Photoshop CS2 Scripts
Call a Photoshop Action
Play a Photoshop action by name. It supports the calling of your action from various Action Sets, as well. download
Check for the Existence of a Clipping Path
Repeat for every path in the document (image) and evaluate whether it is a clipping path. If a clipping path does exist, the routine returns "OK". download
Close All Open Documents
Repeat for every open document, closing each without saving.
download
Fill Inverse of a Selection
This sample first sets the foreground color to white. Next, it creates a selection from the first working path, inverses the selection, and fills it with the foreground color. download
|