But I accept the challenge
You don't need to delete the ini file first, savesettings will overwrite it if it already exists
As long as you don't use button names for commands and no ids your script looks fine as well
But I accept the challenge
Oh right - and it's even mentioned in the doc (which I read)You don't need to delete the ini file first, savesettings will overwrite it if it already exists
I'm not using button-names, but "#1070;;:go" would qualify as an ID, right? But even w/o special treatment that option works fine.As long as you don't use button names for commands and no ids your script looks fine as well.
Code: Select all
$inifile = "%temp%\xysettings.tmp";
savesettings 1,$inifile;
$hamburgerMenu = getkey("CrumbHamburger","Settings", $inifile);
delete 0,0,$inifile;
if ($hamburgerMenu) {
$command = popupnested($hamburgerMenu);
if ($command) {
// Don't execute XY ids twice
if (!regexmatches($command, "^#\d+")) {
// We need to translate items like ":newfolder" to the button id that needs to be used for it
if (regexmatches($command, "^:[^:]")) {
button $command;
// Normal script execution
} else {
load $command, , "s";
}
}
}
}$hamburgerMenu = getkey("CrumbHamburger","Settings"); in place of your line which was required at the time because of the duel "CrumbHamburger" lines. When I made a change to the Hamburger menu itself, the change was carried out (no save necessary). No change was seen in the save settings toolbar icon indicating a save was necessary. When I used the script however, with the above SC getkey change, the change was not carried out.Well maybe but Don does make a point of saving settings in the help for SC setkey, so they should probably be consistent.
Note: Only the key on disk is changed, not the current setting in memory! To realize any changes made via setkey you should use "Restart without Saving" in menu File!
Yeah, I thought that a bit odd and I think that's what got me on the wrong trail concerning savesettings and getkey. I can submit a bug.