Skip to main content
Known Participant
August 28, 2008
Question

How to call the photoshop action file?

  • August 28, 2008
  • 5 replies
  • 8287 views
I need to know how to call the photoshop action file(*.atn) through javascript. Kindly advice me.
This topic has been closed for replies.

5 replies

Known Participant
October 6, 2008
My mistake Larry, I had it right in my script but misstated it in my post.
Larry G. Schneider
Community Expert
Community Expert
October 6, 2008
The example you gave has the order backwards. It should be app.doAction ('Action', 'Action Set')
Known Participant
October 6, 2008
xbytor:

Thanks for the information on calling an action. I'm new to JavaScript as well and still don't have a good grasp on scripting or syntax.

I now able to call an Action from the Actions Palette with your help from above but I'm still having a problem getting a script to load an Action into the Actions Palette.

Example: app.doAction('Action Set', 'Action')

Could you provide an example script for loading an Action? I've attempted to load an action using several versions of a script, including one version which included a path to the folder without any luck.

I can't find a reference to "app.load" in either the Photoshop CS3 Scripting Reference or the Javascript Bible, Gold Edition; are there any other resources I should be getting?
Known Participant
October 6, 2008
If you want to load an action (.atn) file into the Actions Palette, you'll need
to do something like this:

app.load(File("~/my-actions.atn"));

Then you can call the actions with app.doAction.

-X
Known Participant
August 30, 2008
Prabudass@adobeforums.com wrote:
> I need to know how to call the photoshop action file(*.atn) through javascript. Kindly advice me.

You can use app.load() to load action files into the Actions Palette.

You can use app.doAction() to run a specific action in the palette.

If you want to run a specific action from an atn file without loading it into
the palette, it can be done using code found in my xtools library but it is not
necessarily an easy or wise thing to do.

If you want to run all action in an action set, the ActionSetRunner script
referred to previously would do the trick.


-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
c.pfaffenbichler
Community Expert
Community Expert
August 30, 2008
Im not experienced at Scripting, so I probably wont be any help anyway, but what exactly are You trying to achieve?
And could Xbytors ActionSetRunner be any help to You?
http://www.adobeforums.com/webx/.59b55567