mIRC Home    About    Download    Register    News    Help

Print Thread
#178919 16/06/07 01:18 PM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
Is there a good reason that we can't press some alt + * when a dialog is the active window ?
With @win, we can, i think it will be great to can with dialog too


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #178943 16/06/07 06:12 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What would that be for? You can use ALT and another key to activate a control if you set the control up properly (using &).


Invision Support
#Invision on irc.irchighway.net
Riamus2 #178952 16/06/07 08:16 PM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
i'm not sure to understand what you said, did you said that we can 'set' what alt + another key will do on a dialog ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #178959 16/06/07 08:49 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Yes. You put the & symbol before a letter in the caption of a button, and then hitting Alt+that letter will activate that button.

So making a button with the caption of "&Caption" would let you use Alt+C to access the button.

If you don't want a button but just want the key to do something, then simply adjust the button's position until it's off the dialog.

hixxy #178965 16/06/07 09:00 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: hixxy
If you don't want a button but just want the key to do something, then simply adjust the button's position until it's off the dialog.


Personally, I prefer to hide a button in that situation instead of placing it off of the dialog. It just seems cleaner that way. smile

Anyhow, here's an example part of a dialog:

Code:
  button "&Ok",20 20 20 10, ok


That will allow you to press Alt-O inside the dialog to activate the button.

Here's one more example:

Code:
  button "Open &Log",20 20 20 10


That will use Alt-L to activate the button. The & can be placed before any letter in the text.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #178976 16/06/07 09:45 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Just make sure that you don't specify the same letter in more than one button, otherwise it's going to default to the first one encountered in the dialog layout.

hixxy #178989 16/06/07 10:53 PM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
Ok i already know that, just forgotten works with alt because never use it.Anyway, i think if mirc can know if there a key for a letter and if not, apply what he doing with other active window like open mirc option when hit alt + o would be nice.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #178994 16/06/07 11:26 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
As stated, just include the & in front of the key letter that you want to use. Windows (not mIRC) will track and alter the response as appropriate.

RusselB #178997 17/06/07 12:05 AM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
??
i don't want put & anywhere, i just want that if i hit alt + o on a dialog that haven't key letter for "o", mirc open mirc option




#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #178998 17/06/07 12:10 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I can kind of see how it might be useful to allow Alt-O to open mIRC's options dialog even if you are in a dialog window as long as there isn't a &O somewhere in there, but I'm not sure how useful it really is. There are the occasional times when I try Alt-O while inside a dialog only to have nothing happen and I have to click out of the dialog, but it's pretty rare.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #179004 17/06/07 12:43 AM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
Yeah, for alt + o it isn't really useful but i wanted this option for alt + r, because as you said, click out of the dialog just to open mirc script editor ( thing that happen really often ) is a bit annoying to me


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #179007 17/06/07 01:50 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I think part of the reason for that might be to ensure that you don't edit the layout of a dialog while the dialog is open, since the layout in the code might've changed, but those changes wouldn't be reflected in the actual display until the dialog needed to be reopened, and, therefore, have to have been closed previously.

RusselB #179009 17/06/07 02:41 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
No, RussellB, that most likely doesn't have anything to do with it. Keep in mind that it is very useful to leave a dialog open and edit the events then test them rather than having to reopen the dialog every time. Events work immediately in a dialog once the script is saved. The only things that won't work without reopening the dialog are the default layout and the initialization code.

Most likely, the cause is just a matter of the default Alt commands only working when the main window is active as just a global way to prevent those from working if mIRC is minimized. Most likely, it just wasn't thought about needing to use those commands while in dialogs.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #179012 17/06/07 03:46 AM
Joined: Jul 2006
Posts: 4,144
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
Yes the exemple of editing remote and just saving code instead of reopening dialog is the best but you can imagine a dialog, with a button "open mirc option" or "open mirc script editor", and using com object, reproduce alt + 'o' or 'r' to do what you want.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #179013 17/06/07 04:01 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
To clarify Wims original post since it caused a little confusion.

Wims is requesting that when an alt key combination is not assigned in a dialog using &X, mirc should fall back on its own default alt key combinations rather than doing nothing.

This could be quite useful. Possibly confusing if you are not expecting a dialog to have a certain key conbination, yet it does and performs the wrong action, but useful non-the-less.

Maybe an addition to the 'option' declaration in the dialog code could be used to determine mircs behavior with the alt keys. (nokeys,dialogkeys,mirckeys,fallbackkeys,whatever)


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard