Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Loop Action

Community Beginner ,
Jul 21, 2016 Jul 21, 2016

Copy link to clipboard

Copied

Hi,

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.

Thanks!

Jackson

TOPICS
Actions and scripting

Views

2.8K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jul 21, 2016 Jul 21, 2016
Seems like an issue for the Scripting Forum Photoshop Scripting Have not tested it, but for example: Script I made: Iterate Action Over Layers

Likes

Translate

Translate
Adobe Community Professional ,
Jul 21, 2016 Jul 21, 2016

Copy link to clipboard

Copied

Seems like an issue for the Scripting Forum

Photoshop Scripting

Have not tested it, but for example:

Script I made: Iterate Action Over Layers

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 22, 2016 Jul 22, 2016

Copy link to clipboard

Copied

Hi c.pfaffenbichler,

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.

Thanks!

Jackson

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 22, 2016 Jul 22, 2016

Copy link to clipboard

Copied

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.

faux-loop.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 22, 2016 Jul 22, 2016

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 23, 2016 Jul 23, 2016

Copy link to clipboard

Copied

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??

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 23, 2016 Jul 23, 2016

Copy link to clipboard

Copied

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:

dupe-step.png

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 16, 2021 Nov 16, 2021

Copy link to clipboard

Copied

LATEST

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

https://www.ozzu.com/questions/455621/photoshop-play-an-action-repeatedly#post-607170

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines