Is it possible to use a script to "get" the current sort state (ie: column and ascending/descending), including if the sort is ignoring articles?
Thanks in advance for any help
get command knows the sort state and savesettings (to a temp .ini file to not overwrite the current one) updates the pane.ini file(s) which you can get the key Style in the section ListBrowse from via getkey and then you only need to look at viewtopic.php?t=12999 and use its "expand" part to check if the bit flag for 32768 (= Ignore Articles When Sorting) is set...Thanks a lot highend, I've gotten this far:highend wrote: ↑14 Oct 2021 09:27 Sure, thegetcommand knows the sort state andsavesettings(to a temp .ini file to not overwrite the current one) updates the pane.ini file(s) which you can get the keyStylein the sectionListBrowsefrom viagetkeyand then you only need to look at viewtopic.php?t=12999 and use its "expand" part to check if the bit flag for 32768 (= Ignore Articles When Sorting) is set...
get command knows the sort state"get("Sort", [pane=a]);savesettings (to a temp .ini file to not overwrite the current one) updates the pane.ini file(s)"savesettings, "xyplorer_temp.ini";Style in the section ListBrowse from via getkey"getkey("Style", "ListBrowse", "<xypane>\pane.ini");getkey?Code: Select all
get("Sort", [pane=a]);Code: Select all
getkey("Style", "ListBrowse", "<xypane>\pane.ini");The last part of it isn't that hard to understand. It's only two loops. One to find the maximum number of bits and the second one that checks if a specific bit is set or not. The dereferencing (to create variables out of the values) isn't necessary. And you need the "is bit 16 (= 32768) set or not", otherwise you don't know if "Ignore Articles When Sorting" is active or not...In fact, I confess I barely understand any of that script
If you don't do it, you won't get the current value of "Ignore Articles When Sorting" so it's your decision if you do it like this or notIs there any way to do this without saving the settings?
"That's nonsense... Menu - Scripting - [x] Syntax checking^^"highend wrote: ↑15 Oct 2021 01:06That's nonsense... Menu - Scripting - [x] Syntax checking^^Code: Select all
get("Sort", [pane=a]);
What's the use of both of these if you don't assign the result to a variable to be able to do something with them?Code: Select all
getkey("Style", "ListBrowse", "<xypane>\pane.ini");
The last part of it isn't that hard to understand. It's only two loops. One to find the maximum number of bits and the second one that checks if a specific bit is set or not. The dereferencing (to create variables out of the values) isn't necessary. And you need the "is bit 16 (= 32768) set or not", otherwise you don't know if "Ignore Articles When Sorting" is active or not...In fact, I confess I barely understand any of that script
If you don't do it, you won't get the current value of "Ignore Articles When Sorting" so it's your decision if you do it like this or notIs there any way to do this without saving the settings?
Code: Select all
$a = get("Sort");Code: Select all
$b = getkey("Style", "ListBrowse", "<xypane>\pane.ini");savesettings to allow it to save the panes in the folder of the [ini] file?[ini] (internally resolved).