Sign in to follow this  
Followers 0
Kyler Carlson

get the control under a mouse

4 posts in this topic

hey... i need the current control that is under the mouse. for some reason this doesn't work so i'm not sure how to do this.

#include <GUIConstants.au3>

...

Func enable()
    $a = GUIGetCursorInfo()
    If IsArray($a) Then ControlEnable("","",$a[4])
    MsgBox(0,"",$a[4])
EndFunc

Share this post


Link to post
Share on other sites



anyone??

Share this post


Link to post
Share on other sites

okay... i might of found out why... "GUIGetCursorInfo()" i think is only meant to work on the gui that is created by a script its running in... how does the autoit window info get its control id's? Thats more of what i'm looking for... for it to work with any window.

Share this post


Link to post
Share on other sites

"GUIGetCursorInfo()" i think is only meant to work on the gui that is created by a script its running in

That's right. Use _ControlGetHandleByPos() in conjunction with MouseGetPos().

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0