Page 1 of 1

Manual Sorting scripting command

Posted: 27 May 2014 05:27
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

Re: Manual Sorting scripting command

Posted: 27 May 2014 07:32
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

Re: Manual Sorting scripting command

Posted: 27 May 2014 09:52
by jaywalker32
Thanks a lot!
Exactly what I was looking for.

Re: Manual Sorting scripting command

Posted: 27 May 2014 10:35
by bdeshi
My pleasure! :D