Counters and my Mega Macro!

I've been working on this Macro on and off for a while now and thanks to suggestions here have been refining it and hopefully making it less random. But I have hit a block. I know I'm doing something daft but not sure what it is :grinning_face_with_smiling_eyes:

So I have a Photoshop file with hundreds (could be thousands) of layers. I want to do the following:

Set/reset a Variable to 0000
Make the Named Clipboard the Variable (although I wonder if it is necessary at this stage)

[Start a loop which can go as many times as there are layers]

Increment the Variable by 1 (0001)
Make the Named Clipboard the (updated) Variable
Export a PNG
Tab 3x to get the Filename part of the dialog
Insert the Named Clipboard text
Append .png to the name
Press Save
Do some Layer operations
end of first pass

But it stalls fairly early on at the save dialog.

Can anyone see if the Variable creation is wrong or too complex?
and Does anyone have tips for better selection of the filename bit of the dialog?

Many thanks

1 Like

You're right, you don't need the "Set Named Clipboard" action here:

or the second "Set Variable CurrentCounter to Named Clipboard" action here:

In fact, that second "Set Variable" action is negating the CurrentCounter reset in the prior action. I would suggest getting rid of both of those actions, then changing this part of the macro:

to something like this:

Aah thank you will give it a go :pray:

@gglick thank you
With a few longer pauses it is now ticking away repeating 50 times as an extended test :grinning_face_with_smiling_eyes:

1 Like

Oh and using the small Save dialog makes it work better as it sometimes had the filename section selected and sometimes didn’t - and when it didn’t then it would trip up.
With the smaller one the filename is selected each time.