Page 1 of 1

Edit|Select On/off toggle

Posted: 08 Nov 2009 22:11
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. :(

Re: Edit|Select On/off toggle

Posted: 08 Nov 2009 23:22
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?

Re: Edit|Select On/off toggle

Posted: 09 Nov 2009 00:09
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. :?

Re: Edit|Select On/off toggle

Posted: 09 Nov 2009 20:29
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;
 }