Select ALL condition

How can I create a condition for when all files and folders are selected:

Type:

@if:Select ALL
Condition1
@if:else
Condition2

Thank you

Use scripting, where you can test if the number of selected items is the same as the number of items.

Edit: Answer is here: Select All / Select Nothing button - #2 by Leo

Then so only through a script is it possible to create this condition? Verily what I wanted was a simple thing, to create a kind of Select All=Toggle, a button that could toggle between Select ALL and Select None

Correct. The script would be very simply. We can write it for you if you link your account.

Very good Leo, I'm going to link my account shortly, you deserve everything for such an excellent job, I congratulate you!!!

That sounded like it'd be a nice exercise for me. I couldn't get it to work though. I managed to count all items and selected items and compare them, but couldn't find the command in JScript for deselecting everything and for setting a button to toggled. :thinking:

1 Like

Don't worry, that button's state would be wrong most of the time anyway :wink:

The status bar will be more accurate.

1 Like

Do you mean get information from the status bar to set the button state? :thinking:
Is there even a way to permanently "watch" the button to change its state from within the button command? I mean, the normal function of a button is to execute a command when pressed...

1 Like

No, just as a visual indicator.

You could use a @toggle modifier that reacts to a variable and WatchTab Dialog that sets and resets this variable.

1 Like