Cool - have fun
Found an INT-example in one of my never-finished macros, may look more complicated than necessary but contains some optional proof-checks.
Of course, any input only makes sense if the user shall choose the max-days-limit with it (=Delete all entries older than x days)
MenP_TabsMultiLine{
macroinfo="If too many tabs, show more rows. Set width in F2>Tabbed Browsing";
$_old=getpref(INT,"kmeleon.tabs.multiline");
$_old=="0" ? setpref(INT,"kmeleon.tabs.multiline","1") :0;
$_new=prompt("Set MAX number of lines for tab bar (default 1)","PREF: kmeleon.tabs.multiline",$_old=="0"?"1":$_old);
if ($_new>"0" and $_new<"9") {
setpref(INT,"kmeleon.tabs.multiline",$_new);
statusbar("Tab bar now max ".$_new." lines");
}
$_new="" ; $_old="" ;
}
I'd try if $OnStartup works to restore the bak-pref, then immediately that bak again (delpref)...
Or if that's too early, try $OnLoadOnce... But that tends to get messed by a few other macros, overwriting that string instead of using it incrementally like all other strings. And as we know, everyone keeps copying other macros as template, perpetuing mistakes ;-)
Edited 1 time(s). Last edit at 06/06/2015 06:06PM by siria.