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 

function MouseIsOver("ahk_class",x1,y1,x2,y2)

 
Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Scratch



Joined: 22 Jan 2009
Posts: 72

PostPosted: Thu Mar 18, 2010 8:07 pm    Post subject: function MouseIsOver("ahk_class",x1,y1,x2,y2) Reply with quote

In AHK_L we have:

If, MouseIsOver("ahk_class Shell_TrayWnd")

function to determine Mouse is over certain window/control,

or used as directive:

#If, MouseIsOver("ahk_class Shell_TrayWnd")

for context sensitive hotkey.

Proposing to extend this function with optional X/Y parameters to determine if mouse is over a certain rectangle within that window/control

If no ahk-class in quotes given, X/Y rectangle in Active window would be assumed.
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Fri Mar 19, 2010 12:35 am    Post subject: Reply with quote

Related:
- [TOPIC] How to get the window id/title/whatever at a specific xy
- [TOPIC] WM_NCHITTEST wrapping: what's under a screen point?
- [MSDN] Functions (Windows)
(related functions contain the word "point")
_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
lexikos*
Guest





PostPosted: Fri Mar 19, 2010 3:13 am    Post subject: Reply with quote

MouseIsOver really has nothing to do with AHK_L, except that it's useful in combination with #If. Your first example should work fine in standard AHK (assuming you define the MouseisOver function somewhere). I suppose it would be a simple matter of using WinGetPos with the ahk_id returned by MouseGetPos and comparing to the supplied X/Y.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Wish List 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