Retrieves the current X position of the mouse cursor.
MouseGetPosX
Parameters
None.
Return Value
Returns the current X position of the mouse cursor.
Remarks
See MouseCoordMode for relative/absolute position settings. If relative positioning, numbers may be negative.
Related
MouseClick, MouseClickDrag, MouseGetPosY, MouseMove, MouseCoordMode (Option)
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
posx = oAutoIt.MouseGetPosX()
posy = oAutoIt.MouseGetPosX()
WScript.Echo "Mouse x,y:" & posx & "," & posy