AutoHotkey Community

It is currently May 27th, 2012, 3:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: March 18th, 2010, 9:07 pm 
Offline

Joined: January 22nd, 2009, 3:43 pm
Posts: 84
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 1:35 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
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.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 4:13 am 
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.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group