mIRC Home    About    Download    Register    News    Help

Print Thread
ability to disable right click in ... #198097 20/04/08 01:11 PM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: ability to disable right click in ... [Re: foshizzle] #198098 20/04/08 01:26 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
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
Re: ability to disable right click in ... [Re: qwerty] #198118 21/04/08 02:05 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: ability to disable right click in ... [Re: Riamus2] #198119 21/04/08 02:20 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
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

Re: ability to disable right click in ... [Re: genius_at_work] #198120 21/04/08 02:22 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yep, those would work.


Invision Support
#Invision on irc.irchighway.net
Re: ability to disable right click in ... [Re: Riamus2] #198194 23/04/08 03:58 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
that would be nice, but woudlnt it screw up backwards compadability?


This is not the signature you are looking for
Re: ability to disable right click in ... [Re: foshizzle] #198195 23/04/08 08:55 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: ability to disable right click in ... [Re: foshizzle] #198202 23/04/08 12:07 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: ability to disable right click in ... [Re: foshizzle] #198203 23/04/08 12:11 PM
Joined: Dec 2002
Posts: 2,016
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,016

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

Re: ability to disable right click in ... [Re: RoCk] #198204 23/04/08 12:34 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
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.
Re: ability to disable right click in ... [Re: Horstl] #198205 23/04/08 12:52 PM
Joined: Dec 2002
Posts: 2,016
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,016

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.