We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I have an action that I would like to apply to all layers. I have 100+ layers, and I have added "select below layer" at the bottom of the action so essentially I could press "play" 100 times to get done, but is there a script, or function that will allow me to loop the action? I don't believe batch will work because I want the action to apply to all layers within the same composition.
Thank you for this reference. I used the code and it almost worked, but the action did not analyze each layer individually, rather took the first reading (Color Range) from the first layer and applied it to all of the following layers below it. This script can be used for a lot of other things, but I just need my action to loop so that each layer is individually analyzed by the action. I already have "select next sequential layer" at the end of the action, so all layers will be applied when it is looped.
If you have any other ideas on how I can loop an action please let me know.
Action A is the target action that Action B plays. I manually setup the required number of repetitions in Action B (so not really a loop, which would require a script). Obviously not very elegant but it does illustrate a point.
Action A is never played directly by the end user. Only Action B is played by the end user. Action A is a means to an end, action B will play action A.
Top image is before, bottom image is the result.
Not sure if these will help or not, they show one method of looping through layers:
Ah that's a great idea to have one action play another multiple times. I guess it would defeat the purpose of saving time, since you're pressing play on action A, x number of times anyhow, but if you made action A super simple at first, like "select layer", then you could create Action B quickly, and then make action A more process intensive.
I was able to use the script by Chuck Uebele in this thread: Re: Possible to apply an action to each frame in a video footage??
I guess it would defeat the purpose of saving time, since you're pressing play on action A, x number of times anyhow
I think that you misunderstood. It does not defeat the purpose of saving time, let me explain… Action A is only played once. It does not matter if it has 1 or 100 steps, the action needs to be played at some point on your other layers anyway. Or as you mention, the action could be simplified or have steps unticked to turn them off for the purpose of recording faster, then tick them again to turn them back on.
To repeat Action A, the play step is duplicated by dragging the action step to the new action icon, like this:
Once you have a number of duplicated steps, you can shift select multiple play steps and drag them to the new icon. In the example above there are three play steps. If I shift select all three play steps and dragged them to the new action icon, I would now have six play steps – all without manually playing the action multiple times. I could then shift select all six play steps and duplicate them again, resulting in twelve play steps etc.
Glad you found a scripted solution, I love actions – however there is only so far that one can take them.
Here is a script, put this in a file RunActionX-Times.jsx(change the extension from .txt to .jsx) and copy to your Adobe Photoshop>Presets>Scripts folder on windows.
In Photoshop, your new script should appear under File>scripts. Just type in the number of times you want an action to run and VIOLA! Works like a charm!
Credit to jcombs
Link to original discussion