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 

Context sensitive hotkey only if ClassNN is not detected

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
David.P



Joined: 18 Nov 2006
Posts: 189

PostPosted: Tue Aug 19, 2008 3:28 pm    Post subject: Context sensitive hotkey only if ClassNN is not detected Reply with quote

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





PostPosted: Tue Aug 19, 2008 3:34 pm    Post subject: Reply with quote

Code:
MouseGetPos, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl
If (OutputVarControl = "RICHEDIT50W1")
   Return
Back to top
HugoV



Joined: 27 May 2007
Posts: 650

PostPosted: Tue Aug 19, 2008 3:36 pm    Post subject: Reply with quote

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



Joined: 18 Nov 2006
Posts: 189

PostPosted: Tue Aug 19, 2008 3:48 pm    Post subject: Reply with quote

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



Joined: 27 May 2007
Posts: 650

PostPosted: Tue Aug 19, 2008 3:56 pm    Post subject: Reply with quote

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



Joined: 18 Nov 2006
Posts: 189

PostPosted: Tue Aug 19, 2008 4:25 pm    Post subject: Reply with quote

Correct.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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