Edit|Select On/off toggle

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Edit|Select On/off toggle

Post by aurumdigitus »

Is there a way - or can a script be constructed - to emulate the "Toggle No/Last Visual Filter" button for the current Selection Filter?

Please note I have tried to implement with setfilter but any not making much headway. :(

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Edit|Select On/off toggle

Post by serendipity »

aurumdigitus wrote:Is there a way - or can a script be constructed - to emulate the "Toggle No/Last Visual Filter" button for the current Selection Filter?

Please note I have tried to implement with setfilter but any not making much headway. :(
You can use command ID #355.

Code: Select all

//Toggle last filter  
  #355
Or did i misunderstand you?

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: Edit|Select On/off toggle

Post by aurumdigitus »

As LBJ liked to quote, "Come let us reason together".

The goal is to do for Selection Filter what #355 does for Visual Filter. Since no command ID fits have been playing with setfilter. Have been able to get script to Select but the Toggle aspect has not found a solution. :?

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Edit|Select On/off toggle

Post by serendipity »

aurumdigitus wrote:As LBJ liked to quote, "Come let us reason together".

The goal is to do for Selection Filter what #355 does for Visual Filter. Since no command ID fits have been playing with setfilter. Have been able to get script to Select but the Toggle aspect has not found a solution. :?
Oh I see. It is possible. I made a quick and dirty script and it does work, but creates a file called ToggleSelection.ini inside XYplorer folder (which can be changed). Like i said it does work fine for me. Try out and see if this is what you want. And feel free to tweak it the way you want.

Code: Select all

//Toggle Selected items
 $count= getinfo ("CountSelected");
 IF ($count => 1) {
 $items= getinfo ("SelectedItemsNames", |);
 setkey $items, "Items", "Selected", "ToggleSelection.ini";
 #251;
 }
 ELSE {
 getkey $items, "Items", "Selected", "ToggleSelection.ini";
 selfilter $items;
 focus;
 }

Post Reply