-
Notifications
You must be signed in to change notification settings - Fork 1
Cursor
Manuel Cabral edited this page Jun 13, 2022
·
9 revisions
The Cursor class contains methods for controlling the mouse.
class cornelius.Cursor
-
Gets the current cursor position
Returns -> (tuple) with the next items
- x (int): The vertical position in pixels
- y (int): The horizontal position in pixels
- point (POINT)
-
Sets the cursor position (in pixels)
Parameters
- x (int): The vertical position in pixels
- y (int): The horizontal position in pixels
Returns -> None
-
Press a mouse button
Parameters
- button (int): The button id to press (1: left, 2: right)
Raises
- InvalidButtonException (CorneliusException): If the button is not valid
Returns -> None
-
Release a mouse button
Parameters
- button (int): The button id to release (1: left, 2: right)
Raises
- InvalidButtonException (CorneliusException): If the button is not valid
Returns -> None
-
Send a left click
Parameters
- delay (float): Delay between clicks in seconds
Returns -> None
-
Send a right click
Parameters
- delay (float): Delay between clicks in seconds
Returns -> None
-
Parameters
- button (int): The button id to check (1: left, 2: right)
Raises
- InvalidButtonException (CorneliusException): If the button is not valid
Returns -> (boolean) True if pressed, False otherwise
- class cornelius.Cursor.LEFT_BUTTON
- class cornelius.Cursor.RIGHT_BUTTON