Toggle Select

I have a menu button with a bunch of select commands. The button itself performs Select All on the active pane. I would like to have the button actually perform a toggle select operation in which it either selects all or selects none. Is this possible?

Toggling directly isn´t possible (not 100% sure), but why don´t you use a button with LMB SELECT ALL & RMB SELECT NONE?
You could also use MMB with SELECT INVERT

Thanks for the reply. I was using a 3-button configuration exactly as you stated, but am experimenting with various configurations to optimize toolbar layout and space utilization. I can go back to it, just prefer not to.

Honestly, having the ability to combine a 3-button operation with a menu would solve this...

Chuck

Like you, I also try to optimise layout and space. This is not exactly what you are asking for but you could define a shift or ctrl modifier to Select NONE on the same button. I use this technique a lot.

@keydown:none
Select ALL
@keydown:shift
Select NONE

Regards, AB

Nifty! Just for kicks, I expanded it as follows:

@keydown:none
Select ALL
@keydown:shift
Select NONE
@keydown:ctrl
Select INVERT

Thanks Aussie!

@Jon @Leo

Resurrecting this. How might I select item(s) via a button (mouse click) and deselect the same item(s) via another mouse click of the same button without using the @keydown modifier

Is something like "Select Toggle" an option? If not, please consider this a feature request.

You can toggle between select all and select none like this:

Select {=selitems==totalitems?"NONE":"ALL"=}
1 Like

How might I identify particular file extensions using this method?

You’ll probably need to use a script if you want it to only affect certain extensions while still acting as that kind of toggle.

Depends on exactly what you want.

Not quite what you asked for but it might serve your needs.

Put these commands in a button:

@disablenosel
Select SIMILAR MAKEVISIBLE NOPATTERN
// to hide unselected files
Select NOPATTERN HIDEUNSEL

Select at least one each of each extension and the use the new button with the code above.

Thanks for the response. I currently have an evaluator button set up as follows:

It appears as follows:

I would rather click the button to select the items, then click the button again to deselect them, if possible.

As I understand it, one can't mix scripts and evaluator code, which may make this moot.

Thoughts?

Thanks for providing this option. I think there's more work involved than my current solution.

Hi, I'm here to chip in my two cents, i guess this would sufice ?)

@if:=IsSelected("*.(jpg|png|gif|bmp)")
Select *.(jpg|png|gif|bmp) DESELECT
@if:else
Select *.(jpg|png|gif|bmp)

you can replace the extension(s) to your needs.

2 Likes

@joer EXACTLY what I needed, thanks!

1 Like