Copy link to clipboard
Copied
Is there a way to determine if an action is currently being recorded?
The most obvious way is to try playing a known action or run menu items that are usually locked during recording (for example, duplicate a command, delete a command, etc.). If an error occurs, then recording is in progress. However, in this case, a system dialogue appears that cannot be suppressed by try... catch or DialogModes.NO 😞
 
try to ctreate droplet from this action.
Copy link to clipboard
Copied
Open your Actions Panel.
If the round record button is red, you are recording an action.
To stop recording, hit the square stop playing/recording button to the left.
See screenshot.
Actions Panel, recording in progress
Copy link to clipboard
Copied
... tag is "Actions and scripting". I want to do it not by my eyes, but in script 🙂
Copy link to clipboard
Copied
try to ctreate droplet from this action.
Copy link to clipboard
Copied
A droplet is simply created without causing any errors or changing the state of the action record.
Copy link to clipboard
Copied
You are confusing something. If the action is playing or recording, then it will not work to make a droplet from it. The error is easily caught.
Copy link to clipboard
Copied
!!! Thanks! I try to save droplet for another action, not the one that is currently active 🙂 The operation is a bit time-consuming, but nevertheless solves my problem
Copy link to clipboard
Copied
Plug-in scripts sort or do that. While recorging an action you can record using a script. When you record a step menu File>automate>Fit Image.... The fit image script will open its dialog so you can enter the width height and option. When you Click The script will record the settings you entered into its dialog into the action step and do the document constrain resize. The settings may be written bey the action recorder because if the code in the first 1000 characters in the script. When the action is played the action players will pass a message to the script ant the script will bypass displayine its dialog and uset the pass setting if you did nit force the dialoog to be displayed vvia checking thr mernu boox in the action step
Copy link to clipboard
Copied
My script already works in plug-in mode. The problem is not in editing and saving the settings, but in fact that the script should start the action in which it recoredered itself as a result of its work. Because of this, a system dialog appears with a message about the impossibility of starting the action in the recording process (which, however, does not affect the recording of the action and its launch with the settings are successfully recorded as a command).
The problem with launching an action during the recording process can be solved in two ways - either to "understand" that the operation is being recorded and not to activate the launch of the action inside the script, or to disable the launch of the action in normal script operation mode. So far I have chosen the second option, but I am looking for ways to implement the first.
P.S. the script is very simple - it launches the active action sequentially for each selected layer. However, I decided to add a little recursion and added the ability to run the same action into which the script itself was recorded - the problem occurs when recording at this point
Copy link to clipboard
Copied
Did 'Insert Menu Item' not work as well?
Copy link to clipboard
Copied
Works. But in this case, another error appears - "you can not pley the action during playback 🙂". The problem arises because I use app.playbackParameters.count in order to determine if the script is running from the menu or from the action panel. When a menu command is inserted into an action, the script considers that it is launched from the menu and tries to work in normal mode (i.e., find and launch the action) - this behavior is blocked by Photoshop with an error message.
Copy link to clipboard
Copied
I'm trying to figure out how to "Stop Playing/Recording". Do you know if there's a way to do this via Scripting? I compiled a scripting listener plugin to record actions, but it starts recording and won't stop.
Copy link to clipboard
Copied
No, I don't know how to do that.
How exactly do you listen to events?
Copy link to clipboard
Copied
Using "ScriptingListener.plugin" from Adobe. On a mac Silicon chip I had to enable Rosetta for it to work, duplicated my photoshop app and changed the icon so I didn't have to toggle back and forth.
Copy link to clipboard
Copied
Events and actions, although related, but not the same thing. Answered you in the topic "Stop Playing/Recording" on the Actions panel via scripting?
Copy link to clipboard
Copied
Thanks, looking to stop the actions panel from recording an action and not the scripting listener.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now