| View previous topic :: View next topic |
| Author |
Message |
fogus
Joined: 28 Mar 2007 Posts: 28
|
Posted: Tue Apr 15, 2008 3:23 am Post subject: Make F6 press "OK" on any message box |
|
|
Basically, I would like to be able to press F6 (or some hotkey) press the OK button in a message box (if there is an OK button).
Example: there is a really annoying Outlook message that says "Your IMAP server closed the connection. This can occur.. blah blah blah..."
There is an "OK" and a "Details" button. I want a hotkey to press that button what that message is in focus.
I am not aware of a way to navigate through buttons, but I think there must be one. Suggestions, anyone? _________________ ~fogus |
|
| Back to top |
|
 |
poetbox
Joined: 07 Jan 2007 Posts: 60
|
Posted: Tue Apr 15, 2008 3:54 am Post subject: Re: Make F6 press "OK" on any message box |
|
|
| fogus wrote: | Basically, I would like to be able to press F6 (or some hotkey) press the OK button in a message box (if there is an OK button).
Example: there is a really annoying Outlook message that says "Your IMAP server closed the connection. This can occur.. blah blah blah..."
There is an "OK" and a "Details" button. I want a hotkey to press that button what that message is in focus.
I am not aware of a way to navigate through buttons, but I think there must be one. Suggestions, anyone? |
I'v been made a program Named AutoOk that can do this.First get the active window ,then find the button control,3rd find ok-yes-finish and so on,4th get the control position,5th click it at once.I also make it can autoclick the next-Iagree-etc to help me install program.The new vervion of it I let it close some known windows that contain my defined title,and tell it donot click some button I define. It does well.I haven't English version.I donnot write it by AHK.You can follow this guide to make you own. |
|
| Back to top |
|
 |
fogus
Joined: 28 Mar 2007 Posts: 28
|
Posted: Tue Apr 15, 2008 4:15 am Post subject: |
|
|
| Quote: | | I haven't English version |
That's quite all right. Thanks for the info.
Did you use the AutoHotkey language to write this program?
Isn't there something like:
Please? _________________ ~fogus |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
Posted: Tue Apr 15, 2008 4:28 am Post subject: |
|
|
get the classnn with windowspy
than you can use controlclick _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
poetbox
Joined: 07 Jan 2007 Posts: 60
|
Posted: Tue Apr 15, 2008 4:30 am Post subject: |
|
|
| I wrote the program long ago before I knew AHK.But you can use AHK' ControlClick to do this,I think so. |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1494
|
Posted: Tue Apr 15, 2008 6:46 am Post subject: |
|
|
| Code: | msgbox Press F6 to close this window
F6::
ControlGet, hwnd, hwnd,, OK, A
ControlClick, , Ahk_ID %hwnd%
return |  _________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
|