Skip to main content
Participating Frequently
August 2, 2007
Question

How to launch photoshop action?

  • August 2, 2007
  • 1 reply
  • 926 views
I'm writing a Bridge CS3 script to generate a web gallery. The user selects some files and starts the script through a context menu item. The script iterates through the selection list a couple of times, writes files, etc.

As the final step, I need to start Photoshop CS3 and run an action on the set of selected files--as if I had picked Tools/Photoshop/Batch... from the Bridge menus but with the action specified so the user does not have to go through the action dialog in Photoshop. After starting the action, the Bridge script is complete and can quit while Photoshop does its batch processing.

The Photoshop action contains mostly "fit image..." and sharpening steps. It also contains some simple scripts, mostly simple "save as" types of operations.

I'm uncertain how to do this. Is this where BridgeTalk must be used? Can anyone direct me to a sample script that does something simple like this?

Is there any problem with having scripts within the action? Some messages I've seen suggest there is, but I'm not certain I'm interpreting them correctly, or whether they apply to CS3.

Thanks.

Guy
This topic has been closed for replies.

1 reply

Known Participant
August 2, 2007
Guy_Scharf@adobeforums.com wrote:

> I'm uncertain how to do this. Is this where BridgeTalk must be used?

Yes. You would have some Bridge JS call some PS JS which would, in turn, call
your Batch/Action.

> Can anyone direct me to a sample script that does something simple like this?

You might want to take a look at the Bridge SDK, if you haven't already. There
are several examples using BridgeTalk. And also look at the code in Common
Files/Adobe/Startup Scripts CS3 to see how Adobe implemented the Bridge
Tools->Photoshop functionality. It's a bit difficult to follow in places but
what you really want to look at is the photoshop10.runActionCommand function in
photoshop-10.jsx. It's one way of calling PS actions from Bridge and it's also
what I use in my code.

>
> Is there any problem with having scripts within the action?

CS3 has apparently addressed this issue but I can't say from personal experience
that it works. However, this was not possible at all in CS2 unless you went to
really extreme measures.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com