• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Repeat Action X times

New Here ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Is a script still required to repeat/play an action X number of times (i.e. cmd+opt+T)? I want to do this 100 times.

 

Thanks,

Greg

TOPICS
Actions and scripting , macOS

Views

183

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

Community Expert , Sep 03, 2024 Sep 03, 2024
quote

Is a script still required to repeat/play an action X number of times (i.e. cmd+opt+T)? I want to do this 100 times.

 

Thanks,

Greg


By @BirdforThought

 

Yes, a script is still required as there is no native feature for this.

 

Change the name of the action set and action in the code from the default action and set placeholder example.

 

#target photoshop

// Loop the input prompt until a number is entered
var origInput;
while (isNaN(origInput = prompt("Enter a whole number:", "3")));
// Conver
...

Votes

Translate

Translate
Adobe
Community Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

quote

Is a script still required to repeat/play an action X number of times (i.e. cmd+opt+T)? I want to do this 100 times.

 

Thanks,

Greg


By @BirdforThought

 

Yes, a script is still required as there is no native feature for this.

 

Change the name of the action set and action in the code from the default action and set placeholder example.

 

#target photoshop

// Loop the input prompt until a number is entered
var origInput;
while (isNaN(origInput = prompt("Enter a whole number:", "3")));
// Convert decimal input to integer
var inputToInteger = parseInt(origInput);

function main() {
    for (i = 0; i < inputToInteger; i++) // Variable prompt N times
    {
        app.doAction("Molten Lead", "Default Actions.atn"); // Change the action and action set as required
    }
}
app.activeDocument.suspendHistory("Repeat action N times (history suspended)", "main()");

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Votes

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 Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Votes

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
New Here ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Thanks, I'll give it a go.

 

Cheers-Greg

Votes

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
New Here ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Is one better than the other?

NOTE: I created the second one but when I browse to it in PS its "greyed out"

Votes

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 Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Whatever gets the job done!

Votes

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
New Here ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Can't select it from within the menu as its greyed out.

Votes

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
New Here ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

I got it and incidentally used the first script!!  The issue was my mac was hiding my file extension.. ha.

 

Thanks for your help. You saved me hours of work.  although I spent an hour on this issue.. haha

Votes

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 Expert ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

LATEST
quote

I got it and incidentally used the first script!!  The issue was my mac was hiding my file extension.. ha.

 

Thanks for your help. You saved me hours of work.  although I spent an hour on this issue.. haha


By @BirdforThought


You're welcome!

 

Hopefully the next time you need to use a script it will go faster for you now that you know what to look for.

 

Votes

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