Button multifunction (View,group,collapse)

So i saw that i can put more than 1 command inside a button, and i created one with those commands

Set VIEW=Details
Set GROUPBY=label
Go GROUPCOLLAPSE=*

To change view,group by label and collapse all those labels. Only the first 2 actions works but to collapse i have to click the button again

If i use
Set GROUPBY=label
Go GROUPCOLLAPSE=*
When i'm already in details view,the collapse works

Go GROUPCOLLAPSE=* will only collapse the groups that are there at the time it is run. If the labels are still being calculated in the background, then some of the label groups may not exist yet and will be created after the collapse happens.

Instead, use Set GROUPCOLLAPSE=on which tells Opus to collapse groups that appear later on as well.

You can also (usually) combine multiple set commands into a single line, which is sometimes more efficient::

Set VIEW=Details GROUPCOLLAPSE=on GROUPBY=label

Working great!! and let's say i want one of the group to be expandedù
I tried with GROUPCOLLAPSE= (because i grouped by label)
But again i have to click 2 times

I don't know if there is a good way to do that. You could add a delay but the amount of time to delay would depend on how quickly the labels in the folder could be calculated, which would depend on the number of files in the folder, disk speed, and what else the PC was doing at the time. Adding a longer delay might work, but might mean you wait longer than needed sometimes.

how do i add delay? the process seems really fast because if i double click the button with same speed i double click folder to open,then i get what i want.
I can still double click but if i can do all in one click is better.

For a very short delay, try running the last line via dopusrt:

Set VIEW=Details GROUPCOLLAPSE=on GROUPBY=label
dopusrt /acmd Go GROUPCOLLAPSE="Whatever The Group Is Called"

Adjust it for the actual command you're using. (I don't know what it is.)

apart from label name what do i have to adjust?
Not working in this form

Wait!! you gave me the wrong command...of course i had to use GROUPEXPAND in the second row :smiley:
Now it works!!!!

I gave you the command you said you were trying to use:

Working great!! and let’s say i want one of the group to be expandedù
I tried with GROUPCOLLAPSE= (because i grouped by label)
But again i have to click 2 times

oh yes so i wrote collapse after i worte "..to be expanded" just some seconds before.

what if the group want to be expanded is without label?
So alla labels collapsed and the "not specified" gruop expanded