Close the groups in the action panel
Copy link to clipboard
Copied
is there a way to close the groups that contain the actions?
Explore related tutorials & articles
Copy link to clipboard
Copied
Why isn't it closing/collapsing when you click on the downward facing Set arrow?
This is only one Set at a time though, sadly, key-modifiers don't do anything globally.
Copy link to clipboard
Copied
I would like to do this with a script if possible
I use dozens of actions and closing them one at a time takes a long time.
Copy link to clipboard
Copied
Ah, I missed the "tag/label" for Actions & Scripting and didn't realise that this was a scripting question... This is beyond my pay-grade and would likely take some advanced AM code. If the action is saved in a collapsed state, then it can be loaded in a collapsed state, which might be quicker and possible to script the removal and loading.
Copy link to clipboard
Copied
To load an action set via scripting:
https://www.ps-scripts.com/viewtopic.php?p=89033
Deleting a set or action is easy enough to get via ScriptingListener.
deleteActionSet("Set 27");
function deleteActionSet(setName) {
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putName( s2t( "actionSet" ), setName );
descriptor.putReference( s2t( "null" ), reference );
executeAction( s2t( "delete" ), descriptor, DialogModes.NO );
}
Copy link to clipboard
Copied
I'm only interested in closing open groups
if you can find a method for it.
thanks for your help
Copy link to clipboard
Copied
I don't know of a way to do that, if you are lucky somebody else does!
What I do know is that if a set is saved in a closed state, it opens that way. So the roundabout workaround is to delete and reopen the set. This will of course change its position in the panel.
It is a less than ideal hack which achieves your desired outcome.
Copy link to clipboard
Copied
I don't know the easy way. If we get access to the action file, then we just need to change the flag of the open group in it to the flag of the closed one and reload file in the palette.
The main difficulty here is how to access the action file.
Actions Palette.psp is updated by Photoshop itself when restarting (that is, the changes that we can make there will not be reflected in real time. In this case, when Photoshop closes, the file will be overwritten and our changes will be lost).
I don't know how to dump an action group into a file using a script. It is possible to make a droplet and read an action from it, but the problem is that the droplet can only export one command at a time. That is, we will first need to unload each command, then manually recreate the state of the palette.
It is not worth it.
Copy link to clipboard
Copied
maybe the question is wrong. My problem is this I don't have to upload shares, I just want to close the action groups which are present in the action panel.
Copy link to clipboard
Copied
There is no way to change the state of the action palette "on the fly" using scripts.
Copy link to clipboard
Copied
Thanks for the reply Kindly you can take a look at this post https://community.adobe.com/t5/photoshop-ecosystem-discussions/copy-as-javascript/m-p/13661197#M7152...
Copy link to clipboard
Copied
I may not understand the problem, but Alt/Option clicking on that arrow will close all open actions in that set.

