| View previous topic :: View next topic |
| Author |
Message |
patgenn Guest
|
Posted: Sat Jan 31, 2009 8:16 pm Post subject: Can Autohotkey sense when the OK button or cancel button... |
|
|
Hello all,
Newbie here. Just trying to learn this a little at a time.
My question is: Can autohotkey sense when an "OK" button or "Cancel" button is clicked before the action happens?
If so, I couldn't find it in a forum question. Would anyone know where to go?
Thanks!
-P |
|
| Back to top |
|
 |
bronco531
Joined: 25 Aug 2007 Posts: 50 Location: USA
|
Posted: Sat Jan 31, 2009 11:26 pm Post subject: |
|
|
might help to see a picture of the buttons. _________________ ~ B r () n c () |
|
| Back to top |
|
 |
svi
Joined: 09 Oct 2006 Posts: 236 Location: Finland
|
Posted: Sun Feb 01, 2009 1:01 am Post subject: Re: Can Autohotkey sense when the OK button or cancel button |
|
|
| patgenn wrote: | | Can autohotkey sense when an "OK" button or "Cancel" button is clicked... |
MouseGetPos, [OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]
retrieves the control under mouse, so clicking is easy to detect, but if you'd want to detect "pressing" (with Enter, Space or possible hotkey/hotkey combination), that's much harder. _________________ Pekka Vartto |
|
| Back to top |
|
 |
Ice_Tea
Joined: 12 Jan 2008 Posts: 131
|
Posted: Sun Feb 01, 2009 4:42 am Post subject: |
|
|
If you're asking about Msgboxes it's really simple...
http://www.autohotkey.com/docs/commands/IfMsgBox.htm
| Code: | ...
IfMsgbox OK
Msgbox you pressed OK.
Ifmsgbox Cancel
Msgbox you pressed Cancel.
... |
_________________
 |
|
| Back to top |
|
 |
|