// Photoshop CS script: applyActionToVisibleLayers // // The action hard-coded in this script is performed upon all visible layers. // // It'd be much cooler if the script would display a list of the existing actions and // let the user choose, but I didn't see an easy way of doing that. So for now, just // edit this script. // // References: // \Program Files\Adobe\Photoshop CS\Scripting Guide\Photoshop Scripting Guide.pdf // \Program Files\Adobe\Photoshop CS\Scripting Guide\JavaScript Reference Guide.pdf // // Jim Elder, Ottawa, Oct 2004 // Start the script debugger // uncomment the line below to cause Photoshop to start its debugger at this point // $.level = 1; debugger; for (var i = 0; i < app.activeDocument.layers.length; i++) if (app.activeDocument.layers[i].visible) app.doAction("applyToVisibleLayers", "Jim's actions.atn"); // ******************************************************************************* // * To customize this script to your needs, edit the line above to suit your // * system. The first parameter ('applyToVisibleLayers') is the name of the // * Action that will be executed (change it to one or your actions, or create // * an action with that name). The second parameter ('Jim's actions.atn') is // * the name given by Photoshop to your custom actions (change it to whatever // * yours is called). // *******************************************************************************