GetPosition Function (CursorClass)

Class

CursorClass.

Action

Returns the screen position of the pointer. Therefore you should use the results of Cursor.GetPosition() as arguments to MoveMouse() or Click() only for Desktop, not for individual windows.

Syntax

point = Cursor.GetPosition()
Variable Description
point The current mouse pointer position. POINT.

Notes

GetPosition returns a record of type POINT, which has two fields:

Field Description
x The x-coordinate. INTEGER.
y The y- coordinate. INTEGER.

The position returned is relative to the entire screen.

Example

POINT pCursor
pCursor = Cursor.GetPosition()