|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
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
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
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
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
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.  Anyhow, here's an example part of a dialog:
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:
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
?? 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
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
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
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
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
|
|
|
|
|