Skip to main content
Inspiring
June 10, 2011
Open for Voting

Photoshop: Record expand/collapse groups in actions

  • June 10, 2011
  • 21 replies
  • 3552 views
I would love the ability to record the "Collapse groups" shortcut John Nack mentioned here: http://blogs.adobe.com/jnack/2011/06/... in my actions.

In my actions I often create lots and lots of folders that I'll need afterwards (workflow actions), which then stay open all the time so I have to collapse them manually.
Therefore it'd be great to be able to record the collapse command to save time and improve the overview over my layers/groups.

21 replies

Inspiring
October 19, 2016
This worked perfectly!  Thanks!
Inspiring
June 1, 2016
You can record it, but only collapse groups for entire document: http://sklad.bereza.cz/00-jarda/00_screenshot/2016-06-01_211132.jpg
Known Participant
April 9, 2016
After typing my reply, I just thought there could be a partial workaround for certain situations:

- To force a group to stay open at the end of the action, we could create an empty "dummy" layer inside every group (named dummy1, dummy2, etc. if need be), then target it in the action clicking on it as a way to register the exact name (hence forcing the group to open) and just afterwards, delete it from the same action - the dummy layer will be gone but the group should stay open. The layer below the deleted dummy will be left as the currently selected layer.

- To force a group to stay closed, one could take advantage of the fact that when creating a group with more than one layer selected, the group is created and closed at the same time, or at least that's the way it works on my computer. It's helpful to know that the shortcuts "Shift + Alt + [" and "Shift + Alt + ]" allow to add-select layers in a backwards/forwards fashion (again, to avoid shift-clicking on specific layer names). These way, we can press Ctrl+G right afterwards so the group is created and closed at the same time. Still, if later on one needs to target a layer inside the closed group after creating it, it will open again and things can get convoluted to do whatever it is that needs to be done, and then ungroup the layers and regroup them again afterwards to leave them closed again. But theoretically, we could still get things sorted out to a certain degree.

Please note these are just some ideas I just thought of - they have not been thoroughly tested, they could be version and os dependant, and even if they work, they're far from being a solution. But I just used some of this tricks with an action of my own (I needed a group to stay open at the end, and another one to remain closed) and it worked as I wanted it to, so I'm sharing these ideas in the hopes that they might be helpful to others.

Note: Remember that the "Alt+[" based shortcuts will only work on english keyboards, and AFAIK the equivalent commands (Select backward layer/Select forward layer) are nowhere to be found in the menus, so it seems like they're only available from the aforementioned shortcuts. In Windows you can add other languages to the Language Preferences, and then switch among them from the icon in the system tray (switch to US English, then the shortcuts should work).
Known Participant
April 9, 2016

(duplicated, delete)

Known Participant
April 9, 2016
I would also like to be able to do this, because when recording actions, I always try to reference layers relatively with alt+ [ or alt+ ] ("select backward layer" / "select forward layer") and similar shortcuts to avoid registering the exact name of the selected layer. But when I create a group as part of an action, from then on there seems to be no way to target any layer inside the group without clicking on it, since after creating the group (with more than 1 layer selected just before creating the group), it is left closed and trying to use "select forward/backward layer" just skips over to the layers above/below the group, not inside. I need to expand the group, but this step won't be recorded 😞
Maybe there's a workaround for this situation but I haven't figured it out... But under any event, being able to record these steps (close/expand groups) would greatly help to leave things arranged exactly as one needs them to be just after aplying complex actions.
Inspiring
March 30, 2016
Yes we need this.
Now it's been 5 years since this was first requested.
Inspiring
May 26, 2014
Agree. When I have a record set I want my group to finish in the closed state. The problem is that I am unable to record this. Can you please add this? Thank you.
Participating Frequently
April 17, 2014
Yes, please add group expanding/collapsing activity to the actions recording soon, since it has mayor influence on recordings including shortcuts of selecting layers above/below the current selection depending on the open/collapsed state of a layer group...
Inspiring
March 24, 2014


When I make actions that include Folders/Groups the groups are left open and I would prefer them closed.

If there is a way to write them into the action as closed that would be great. Unfortunately, simply closing them is not recorded by the action.
Participating Frequently
March 24, 2014


Can I record 'Opening and Closing' of groups?

I know I can leftclick on the triangle next to a group and then close them with ALT+CMD. But there is no way you can record this in an action.

Please add this option to Photoshop CC as it could clean up a whole bunch of layers. It would be a really usefull addition for use in actionscripts.