mIRC Homepage
Posted By: Wims alt + * - 16/06/07 01:18 PM
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
Posted By: Riamus2 Re: alt + * - 16/06/07 06:12 PM
What would that be for? You can use ALT and another key to activate a control if you set the control up properly (using &).
Posted By: Wims Re: alt + * - 16/06/07 08:16 PM
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 ?
Posted By: hixxy Re: alt + * - 16/06/07 08:49 PM
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.
Posted By: Riamus2 Re: alt + * - 16/06/07 09:00 PM
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.
Posted By: RusselB Re: alt + * - 16/06/07 09:45 PM
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.
Posted By: Wims Re: alt + * - 16/06/07 10:53 PM
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.
Posted By: RusselB Re: alt + * - 16/06/07 11:26 PM
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.
Posted By: Wims Re: alt + * - 17/06/07 12:05 AM
??
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


Posted By: Riamus2 Re: alt + * - 17/06/07 12:10 AM
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.
Posted By: Wims Re: alt + * - 17/06/07 12:43 AM
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
Posted By: RusselB Re: alt + * - 17/06/07 01:50 AM
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.
Posted By: Riamus2 Re: alt + * - 17/06/07 02:41 AM
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.
Posted By: Wims Re: alt + * - 17/06/07 03:46 AM
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.
Posted By: Om3n Re: alt + * - 17/06/07 04:01 AM
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)
© mIRC Discussion Forums