Manual Sorting scripting command

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Manual Sorting scripting command

Post by jaywalker32 »

Is there a scripting command/variable that I can use to script a 'toggle manual sorting' to a button?

I can't seem to find anything in the scripting reference regarding this. Is there somewhere else I should look for these types of info?

Thx

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Manual Sorting scripting command

Post by bdeshi »

Hold CTRL and click Help->List All Commands...
in the opened dialog, start typing Manual And only one entry will be left in the list:
418 |#414 Tools | Customize List | Manual Sorting
The number with # (#414) is the id for this command. You can create a button in the toolbar with just this one liner to toggle manual sorting:

Code: Select all

#414;
but if you want a visual reminder if manual sorting is currently enabled or not, use this script:

Code: Select all

#414;
 // state toggle
 if (ctbstate() == 1) {
   ctbstate(0);
 } else {
   ctbstate(1);
 }
(in this case, don't use the "Customize List" menu item, the button on/off state will not update correctly)
similarly, you can call any command from that list by using it's command ID
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: Manual Sorting scripting command

Post by jaywalker32 »

Thanks a lot!
Exactly what I was looking for.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Manual Sorting scripting command

Post by bdeshi »

My pleasure! :D
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply