highend wrote: ↑15 Oct 2021 01:06
That's nonsense... Menu - Scripting - [x] Syntax checking^^
Code: Select all
getkey("Style", "ListBrowse", "<xypane>\pane.ini");
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?
In fact, I confess I barely understand any of that script
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...
Is there any way to do this without saving the settings?
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 not
"That's nonsense... Menu - Scripting - [x] Syntax checking^^"
Not really nonsense. I just hadn't gotten around to removing the unnecessary code and it worked so I wasn't too bothered for now. But here ya go, just for you:
"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?"
No, I hadn't gotten around to that either but, again, here ya go, just for you:
Code: Select all
$b = getkey("Style", "ListBrowse", "<xypane>\pane.ini");
"The last part of it isn't that hard to understand."
Maybe not hard for you but it's not helpful to assume it shouldn't be hard for someone else.
"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..."
Sorry, still don't understand any of that.
"If you don't do it, you won't get the current value of "Ignore Articles When Sorting"
I thought that might be the case.
It's all irrelevant now, anyway. I can't do what I was hoping to do. I hadn't looked into it enough and it doesn't work the way I thought it would. But at least I learnt a little bit about get() and getkey() so thanks for that.