Home > Language Reference > Windows Management Functions > MouseX

MouseX

The MouseX, MouseY functions return the X, Y coordinates of the mouse cursor on the screen.

Usage

Used to acquire dynamically mouse cursor position.

Syntax

x=MouseX()
y=MouseY()

Parameters

None.

Return value

x, integer, abscissa in pixels of the mouse cursor relative to the topleft point of the screen.

y, integer, ordinate in pixels of the mouse cursor relative to the topleft point of the screen.

Examples

x=MouseX()
y=MouseY()