Documentation Index
Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
Use this file to discover all available pages before exploring further.
Class: MouseController
Defined in: index.d.ts:697 Contains functions to control the mouse and to get the location of the cursor. A cartesian coordinate system is used for specifying coordinates. The origin is located in the top-left corner of the current screen, with positive values extending along the axes down and to the right of the origin point and it is measured in pixels. The same coordinate system is used on all operating systems.Constructors
Constructor
new MouseController(): MouseController
Defined in: index.d.ts:698
Returns
MouseController
Methods
button()
button(Defined in: index.d.ts:704 Sends an individual mouse button event. You can use this for example to simulate a click of the left mouse key. Some of the buttons are specific to a platform.button,direction):void
Parameters
button
Button
direction
Direction
Returns
void
location()
location(): [Defined in: index.d.ts:729 Get the location of the mouse in pixels.number,number]
Returns
[number, number]
moveMouse()
moveMouse(Defined in: index.d.ts:720 Move the mouse cursor to the specified x and y coordinates. You can specify absolute coordinates or relative from the current position. If you use absolute coordinates, the top left corner of your monitor screen is x=0 y=0. Move the cursor down the screen by increasing the y and to the right by increasing x coordinate. If you use relative coordinates, a positive x value moves the mouse cursorx,y,coordinate):void
x pixels to the right. A negative value for x
moves the mouse cursor to the left. A positive value of y moves
the mouse cursor down, a negative one moves the mouse cursor up.
Parameters
x
number
y
number
coordinate
Coordinate
Returns
void
scroll()
scroll(Defined in: index.d.ts:727 Send a mouse scroll event. A positive length will result in scrolling down/right and negative ones up/left.deltaX,deltaY):void
Parameters
deltaX
number
deltaY
number
Returns
void
