mIRC Homepage
Posted By: foshizzle ability to disable right click in ... - 20/04/08 01:11 PM
I want the ability to disable the right click menu in custom/picture windows as it gets annoying, or just have the other menu items hidden so the ones told to show for that window are the only ones seen
Posted By: qwerty Re: ability to disable right click in ... - 20/04/08 01:26 PM
What "other menu items" are you talking about? Custom/picture windows only display items that you specify in a menu definition. If you have other scripts that do
menu * {

}
or similar, thus adding items to all windows, including custom ones, you should fix those by making them less general.
Posted By: Riamus2 Re: ability to disable right click in ... - 21/04/08 02:05 AM
Personally, I'd also like to have some way when creating custom windows that prevents menu items not specific to that custom window from being there as well. This would allow your custom window to only have specific menu items when someone else uses it even if they have other scripts that insert menu items all over the place instead of specific.

This could be a switch in the /window command or else a menthod in menu { } to prevent other menu items from showing...

Code:
menu @mycustomwindow {
  haltdef
  OnlyMyMenu
  .AndMySubmenu:Do this
}


It's fine to make your own menus more specific, but if you want to distribute your script(s), you can't control what other scripts users use.
Maybe a switch to keep ordinary * menus from appearing in your custom window.

Code:

menu -r @mywindow {
  OnlyMyMenus:cmd
}



And maybe another switch to make menus ignore the -r setting?

Code:

menu -R @mywindow {
  ALLWindows:cmd
}



-genius_at_work
Posted By: Riamus2 Re: ability to disable right click in ... - 21/04/08 02:22 AM
Yep, those would work.
Posted By: foshizzle Re: ability to disable right click in ... - 23/04/08 03:58 AM
that would be nice, but woudlnt it screw up backwards compadability?
Posted By: argv0 Re: ability to disable right click in ... - 23/04/08 08:55 AM
No, because "-r" isn't a valid menu parameter anyway, so there's no syntactic conflict.
Posted By: Riamus2 Re: ability to disable right click in ... - 23/04/08 12:07 PM
Right, it wouldn't cause problems because the -r wasn't present previously. Of course, older scripts that *want* you to display their menu in every window even if it's some other script's custom window won't be able to... but who really cares? There's no reason why they should in the first place. smile
Posted By: RoCk Re: ability to disable right click in ... - 23/04/08 12:11 PM

It would be taking control away from the user who should be able to add a menu to whatever custom window they want.
Posted By: Horstl Re: ability to disable right click in ... - 23/04/08 12:34 PM
Right. But the problem is the occasional mis-use of menu * { } - taking control away from your own addon/script by enforcing a "third party" popup. Folks *should* use menu <definition> { } propperly, but at times they don't.
Consciously enforcing a menu by -R differs from "accidentally" using the catch-all * menu definition.
Btw: "halt" takes control over events away from you by now - starting the infamous struggle for file order.
Posted By: RoCk Re: ability to disable right click in ... - 23/04/08 12:52 PM

Misuse or not, user control trumps script control, as it should be.

~ Edit ~
I believe there was a similar argument some time ago about adding a timer switch to stop a timer from being halted by using
/timers off.
© mIRC Discussion Forums