Skip to main content
Zesty_wanderlust15A7
Known Participant
May 23, 2021
Answered

Can a PS script (or hack) check actions On or Off?

  • May 23, 2021
  • 3 replies
  • 1594 views

Even "back in the day" I used to use subroutine actions — for different Fit Image settings, for example.

 

I would call all of those sub actions from the main action, but I'd check only the sub action that I needed for that session.

 

You can kinda build some workflows around that, as it saves space and you only have to maintain one version of the main action.

 

If a script could check these actions on or off, a PS button (action) (or other button panel out there) could then easily do that 🙂 (so yeah, you need a number of extra small actions, but in total it will still save space and time.)

 

I mean this checkmark here ...

Correct answer r-bin

Well, setting them alone is already useful, no reading of state necessary.

For the three in my example, you could just turn them all off every time, then let a script "check" the one you clicked the action for. No memory needed either.  Just think of selecting what you want before the main action.


There is a script like act2jsx.jsx (google xtools xbytor). This is how the selected action is saved to the droplet with the subsequent parsing of this droplet to extract commands. You can also find out the status of each command there. If all are disabled, then the Action is disabled. It is a complex script and a complex method. But you can find out the state of Action.

 

Turning on or off these flags, at least through a script and in Photoshop until 2020 (I don't know until 2021), I think it's impossible.

3 replies

Zesty_wanderlust15A7
Known Participant
May 23, 2021

This is how it could look ...

I call all subactions but only preselect what I want. 

Zesty_wanderlust15A7
Known Participant
May 23, 2021

Even if you could do it, the next problem is feedback of their On/Off state.

I think something like Retouching Toolkit might be able to do that and poll the states on startup.

Before I ask them, I'm wondering if it's possible to change the state somehow...

 

But if you have a good memory for what you clicked, you could make a cool script too though — one that could make sure only only of the three options is selected.  But you have to be able to read and set the state of an action. Therefore my question 🙂

Zesty_wanderlust15A7
Known Participant
May 23, 2021

Well, setting them alone is already useful, no reading of state necessary.

For the three in my example, you could just turn them all off every time, then let a script "check" the one you clicked the action for. No memory needed either.  Just think of selecting what you want before the main action.

Stephen Marsh
Community Expert
Community Expert
May 23, 2021

 

Not sure if this is helpful as I'm not sure if I'm understanding correctly or not... By CMD/CTRL double-clicking an action or even a single action step, it will run just the selected action or step.

 

Kukurykus
Legend
May 23, 2021

When you assign shortcut to 'play' button like for ex. 'ctrl & f' you can also play single item.

Legend
May 23, 2021

You forget about partially turned on Actions. : )

 

I think this can only be done by parsing the atn file.

Why does the script need Actions if it can execute them itself in any sequence?

Zesty_wanderlust15A7
Known Participant
May 23, 2021

I'm purely talking about actions here. I usually prefer actions as I like to tweak them a lot.

AFAIK, an action can not record if I check/uncheck another action, so I'm asking if this can be done by a script? (I would then connect those toggle scripts to a button)