Jump to content

Get controlclick coords


AutID
 Share

Recommended Posts

#include <WinAPI.au3>
 
Local $tPoint = 0, $hWnd = 0, $tRect = 0
 
While 1
    $tPoint = _WinAPI_GetMousePos()
    $hWnd = _WinAPI_WindowFromPoint($tPoint)
    $tRect = _WinAPI_GetWindowRect($hWnd)
    ToolTip("hwnd: " & $hWnd & @CrLf & _
            "x: " & DllStructGetData($tPoint, 1) - DllStructGetData($tRect, 1) & ", " & _
            "y: " & DllStructGetData($tPoint, 2) - DllStructGetData($tRect, 2))
    Sleep(10)
WEnd
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...