Skip to content

Tego Bot API Documentation v0.1.1


Tego Bot API Documentation / leftClick

Function: leftClick()

leftClick(x?, y?): void

Defined in: index.ts:820

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.