@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
46 lines (45 loc) • 1.76 kB
TypeScript
import { MouseButton } from './mouse-click';
/**
* Drags the mouse from a start position to an end position.
*
* @param button The mouse button to use. See {@linkcode MouseButton} for details.
* @param startX The starting X coordinate.
* @param startY The starting Y coordinate.
* @param endX The ending X coordinate.
* @param endY The ending Y coordinate.
* @param speed The speed of the drag (1 is fast, 100 is slow).
*
* @returns 1 if successful, 0 otherwise.
*
* @example
* ```typescript
* import { MouseClickDragSync, MouseButton } from '@ahmic/autoit-js';
*
* MouseClickDragSync(MouseButton.Left, 100, 100, 200, 200, 10);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/MouseClickDrag.htm
*/
export declare function MouseClickDragSync(button: MouseButton, startX: number, startY: number, endX: number, endY: number, speed?: number): number;
/**
* Drags the mouse from a start position to an end position.
*
* @param button The mouse button to use. See {@linkcode MouseButton} for details.
* @param startX The starting X coordinate.
* @param startY The starting Y coordinate.
* @param endX The ending X coordinate.
* @param endY The ending Y coordinate.
* @param speed The speed of the drag (1 is fast, 100 is slow).
*
* @returns A promise that resolves to 1 if successful, or 0 otherwise.
*
* @example
* ```typescript
* import { MouseClickDrag, MouseButton } from '@ahmic/autoit-js';
*
* await MouseClickDrag(MouseButton.Left, 100, 100, 200, 200, 10);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/MouseClickDrag.htm
*/
export declare function MouseClickDrag(button: MouseButton, startX: number, startY: number, endX: number, endY: number, speed?: number): Promise<number>;