mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
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


This is not the signature you are looking for
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yep, those would work.


Invision Support
#Invision on irc.irchighway.net
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
that would be nice, but woudlnt it screw up backwards compadability?


This is not the signature you are looking for
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
No, because "-r" isn't a valid menu parameter anyway, so there's no syntactic conflict.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

It would be taking control away from the user who should be able to add a menu to whatever custom window they want.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

Last edited by Horstl; 23/04/08 12:40 PM.
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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.


Link Copied to Clipboard