I'm having trouble finding the mouse coordinates within a game window. This is the working code: Func getpos()
$x = MouseGetPos(0)
$y = MouseGetPos(1)
MsgBox ( 0, "MSG", "MousePos: "& $x &", " & $y , 1 )
endfunc The only result i get is the coordinates of the game window, no matter where the cursor is in the window. MouseMove also failed to move the mouse in the window. However, I can move the mouse with MouseMovePlus. When I tried to read the mouse coordinates at a similar low level, it still didnt work! Func _MouseGetPosPlus()
$tPoint = DllStructCreate("long X; long Y")
DllCall("user32.dll", "none", "GetCursorPos", "ptr", DllStructGetPtr($tPoint))
ConsoleWrite("Cursor X position: " & DllStructGetData($tPoint, "X") & @CR)
ConsoleWrite("Cursor Y position: " & DllStructGetData($tPoint, "Y") & @CR)
EndFunc Can someone please help me with this? I am wondering how the game is blocking the mousecoordinates. I think that the game might be using a software cursor. If so, is it possible to read the position? The game is Xenimus, and can be downloaded at www.xenimus.com