Skip to content

Tego Bot API Documentation v0.2.0


Tego Bot API Documentation / leftClick

Function: leftClick()

leftClick(x?, y?): void

Defined in: botjs/src/index.ts:800

Perform a left-click at the current mouse position or at specified coordinates

Parameters

x?

number

Optional X coordinate to move to before left-clicking

y?

number

Optional Y coordinate to move to before left-clicking

Returns

void

Example

typescript
import { leftClick } from "@tego/botjs";

// Left-click at current position
leftClick();

// Move to (150, 250) and left-click
leftClick(150, 250);

Released under the MIT License.