Method MouseGetPosX

AutoIt X

Method Reference


MouseGetPosX

Retrieves the current X position of the mouse cursor

MouseGetPosX

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, MouseCoordMode (Option), MouseGetPosY, MouseMove

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

posx = oAutoIt.MouseGetPosX()
posy  = oAutoIt.MouseGetPosX()

WScript.Echo "Mouse x,y:" & posx & "," & posy