Jump to content

Recommended Posts

Posted

HI.

I haven't used AutoIT for several years... it use to be that you would get the location of the cursor, relative to the target window, when you used the Window Spy program, now called Autowindow. However, the coordinates of the cursor which are displayed now see to be relative to my whole desktop. Is there an easy or quick way to get the location of the cursor relative to the target window? My apologies in advance as I realize this has probably been addressed dozens of times but I could not find a search function on these forums.

-G

Posted (edited)

Opt("MouseCoordMode", 0)        ;1=absolute, 0=relative, 2=client

While 1
    Sleep(10)
    $xy = MouseGetPos()
    ToolTip("X: "&$xy[0]&@CRLF&"Y: "&$xy[1])
WEnd
Relative to the active window.

Edited by ofLight

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Posted

Now I'm really confused. If I am trying to get the mouse coordinates relative tothe target window using Au3Info.exe ... how would I use that piece of code?

-G

Posted

In the Windows Info Tool look into options along the top and be amazed at what you find.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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
×
×
  • Create New...