Call a Photoshop Action from Applescript

To call a Photoshop action from Applescript type the following:

tell application "Adobe Photoshop CS5.5"
do action "YOUR_ACTION" from "YOUR_ACTION_FOLDER"
end tell

Replace YOUR_ACTION with the name of your action and YOUR_ACTION_FOLDER with the folder your action is in.

Advertisements

4 responses to “Call a Photoshop Action from Applescript”

  1. Ben (@ruralben) says :

    Great idea. I can’t get it to work either way I’ve attempted (shown below).

    Should “YOUR_ACTION_FOLDER” be the path to the desired action set file?

    “user/…/my_folder/my_desired_action_set.atn”

    or to the containing folder (in which the .atn file resides)?

    “user/…/my_folder”

    The only way I can save out my working actions to a folder on my harddrive is by saving out their parent action sets (one-by-one) from Photoshop’s action panel.

    I’m stumped as to how I then modify the script to target a particular action within one of those saved out sets.

    Any advice?

    • kevinseldomridge says :

      “YOUR_ACTION_FOLDER” should be the name of the folder in Photoshop where the action resides. For instance if you have an action titled “MyAction” inside the Default Actions folder in Photoshop, you should just call the following:
      do action “MyAction” from “Default Actions”

      • Rigo says :

        Hi I’m trying to use the photoshop actions I created and giving the user three size options but I can’t seem to get the actions to run once I’ve dropped the files and selected the size. Here’s my code if that helps.

        on open the_Droppings

        tell application “Adobe Photoshop CS6”
        activate
        set stringToBeDisplayed to “Choose the size”
        display dialog stringToBeDisplayed buttons {“Large-475×277”, “Medium-292×130”, “Small-180×100″}

        if result = {button returned:”Large-475×277”} then
        do action “Default_Large.atn” from “Macintosh HD/Users/rigbeas/Library/Application Support/Adobe/Adobe Photoshop CS6/Presets/Actions”

        else if result = {button returned:”Medium-292×130″} then
        do action “Default_Medium.atn” from “Macintosh HD/Users/rigbeas/Library/Application Support/Adobe/Adobe Photoshop CS6/Presets/Actions”

        else
        do action “Default_Small.atn” from “Macintosh HD/Users/rigbeas/Library/Application Support/Adobe/Adobe Photoshop CS6/Presets/Actions”

        end if

        end tell

        end open

Trackbacks / Pingbacks

  1. Run a Photoshop Action from Applescript | The Overthinker - May 30, 2014

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: