Quote
siria
----------------------------------------------
(slightly offtopic, for macro writers only)
@jsnj: That's cool with hiding a menu, have tried to understand your code, and it seems as if the menu is simply identified by it's line number?? Never realized this could work, being used that adding menus usually adds them above that number! Have now thrown together a few lines for experimenting, but somehow, no matter which number is given, that always hides just the current top entry, or perhaps there's a mistake somewhere?
test_modmenu_inline{
$_x=prompt("","Which menu position? (0,1,2,...)");
setmenu("&Tools",inline,"",$_x);
}
test_modmenu_popup{
$_x=prompt("","Which menu position? (0,1,2,...)");
setmenu("&Tools",popup,"",$_x);
}
test_modmenu_rebuild{
# does nothing??
rebuildmenu("&Tools");
}
test_modmenu_build{
setmenu("&Edit",macro,"test_modmenu_popup",test_modmenu_popup,0);
setmenu("&Edit",macro,"test_modmenu_inline",test_modmenu_inline,1);
setmenu("&Edit",macro,"test_modmenu_rebuild",test_modmenu_rebuild,2);
setmenu("&Edit",separator,3);
}
$OnSetup=$OnSetup."test_modmenu_build;";
For location identification, you can also use the STRING item name it preceeds instead of the integer. Try that and see if you get more accurate results. Keep in mind that setmenu wasn't necessarily designed to be used this way(within a session) according to documentation. Hiding an entire menu within a session is not a commonly needed or requested feature. But for my needs in the Search+ extension, it worked, caused no side effects and I left 'good enough' alone
Quote
siria
@mhf: just a wild guess, you didn't happen to copy the name of the macro ("QickStor.kmm") also inside the kmm-file, did you...?
but of course I have overwritten it now so I can't check back.
Often the error console (in Tools menu) can tell more, though not always.
Quote
jsnj
For location identification, you can also use the STRING item name it preceeds instead of the integer. Try that and see if you get more accurate results. Keep in mind that setmenu wasn't necessarily designed to be used this way(within a session) according to documentation.
That came in handy quite often already

Quote
mhf
One suggestion though : maybe a request for confirmation before Delete All ?
Quote
siria
Hmm... and perhaps a user wants more than only 6? *duckandrun* ;-)

Quote
ndebord
Excellent little macro... put it in macros in profile. Easier to use than Hotlinks and just a very useful addition that I find addictive.
Thanks.
Quote
mhf
Quote
ndebord
Excellent little macro... put it in macros in profile. Easier to use than Hotlinks and just a very useful addition that I find addictive.
Thanks.
Glad you like it ...![]()
No seriously, all thanks to James.
$_QuickStore_DelCount = $_QuickStore_DelCount * 2; $_QuickStore_DelCount = $_QuickStore_DelCount / 2;This forces the macro to treat the value as an integer.
Quote
JamesD
@ mhf
Don't forget to change your copy from 6 to 10 in two places.
Quote
siria
Hmm, I'm not sure if that's it. IIRC the wiki says in formulas it doesn't matter whether it's a string or an integer, KM will always take the number in the string and work with that. So far that was always true in my macros too. There I rather suspect the prob lies here:
$_QuickStore_DelCount > $_QuickStore_CurrCount ?
You see, there's just no "MaxCount" defined yet...
$_QuickStore_DelCount > $_QuickStore_CurrCount $_QuickStore_CurrCount < $_QuickStore_DelCount