Skip to content

Tego Bot API Documentation v0.2.0


Tego Bot API Documentation / dragMouse

Function: dragMouse()

dragMouse(x, y): void

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

Drag the mouse from current position to target coordinates

Parameters

x

number

Target X coordinate in pixels

y

number

Target Y coordinate in pixels

Returns

void

Example

typescript
import { moveMouse, dragMouse } from "@tego/botjs";

// Move to start position
moveMouse(100, 100);

// Drag to end position
dragMouse(500, 500);

Released under the MIT License.