AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can Autohotkey sense when the OK button or cancel button...

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
patgenn
Guest





PostPosted: Sat Jan 31, 2009 8:16 pm    Post subject: Can Autohotkey sense when the OK button or cancel button... Reply with quote

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

PostPosted: Sat Jan 31, 2009 11:26 pm    Post subject: Reply with quote

might help to see a picture of the buttons.
_________________
~ B r () n c ()
Back to top
View user's profile Send private message Send e-mail
svi



Joined: 09 Oct 2006
Posts: 236
Location: Finland

PostPosted: Sun Feb 01, 2009 1:01 am    Post subject: Re: Can Autohotkey sense when the OK button or cancel button Reply with quote

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
View user's profile Send private message
Ice_Tea



Joined: 12 Jan 2008
Posts: 131

PostPosted: Sun Feb 01, 2009 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group