| View previous topic :: View next topic |
| Author |
Message |
David.P
Joined: 18 Nov 2006 Posts: 189
|
Posted: Tue Aug 19, 2008 3:28 pm Post subject: Context sensitive hotkey only if ClassNN is not detected |
|
|
Hi forum,
I'm trying to create certain context sensitive hotkeys. However, the hotkeys should only fire if the respective window is present (via #IfWinActive) AND if the mouse is not over a certain ClassNN (actually "RICHEDIT50W1").
Is there an easy way to restrict that hotkey accordingly, such that it only fires if the mouse is over any other ClassNN but not over RICHEDIT50W1?
Thanks already,
David.P |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Tue Aug 19, 2008 3:34 pm Post subject: |
|
|
| Code: | MouseGetPos, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl
If (OutputVarControl = "RICHEDIT50W1")
Return |
|
|
| Back to top |
|
 |
HugoV
Joined: 27 May 2007 Posts: 650
|
Posted: Tue Aug 19, 2008 3:36 pm Post subject: |
|
|
Bobo beat me to it, but if you had done a simple search you would have found it yourself. RTFM & Search! _________________ When parsing a CSV file use Loop, parse, Inputvar, CSV! |
|
| Back to top |
|
 |
David.P
Joined: 18 Nov 2006 Posts: 189
|
Posted: Tue Aug 19, 2008 3:48 pm Post subject: |
|
|
@BoBo²: THÄNKS very much!
@HugoV: Well I did search, but didn't find a solution. Problem for Dummies is that you don't even know what search terms you should be looking for.
But thanks for the RTFM anyway.
Cheers David.P |
|
| Back to top |
|
 |
HugoV
Joined: 27 May 2007 Posts: 650
|
Posted: Tue Aug 19, 2008 3:56 pm Post subject: |
|
|
If you had a look at the commands list http://www.autohotkey.com/docs/commands.htm (obiviously Mouse related) you would have seen:
| Quote: | | MouseGetPos: Retrieves the current position of the mouse cursor, and optionally which window and control it is hovering over. | which is exactly what you wanted. e.g. the RTFM. _________________ When parsing a CSV file use Loop, parse, Inputvar, CSV! |
|
| Back to top |
|
 |
David.P
Joined: 18 Nov 2006 Posts: 189
|
Posted: Tue Aug 19, 2008 4:25 pm Post subject: |
|
|
| Correct. |
|
| Back to top |
|
 |
|