@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
45 lines (44 loc) • 1.63 kB
TypeScript
/**
* Moves a window to a specified position and resizes it.
*
* @param windowTitle The title of the window to move.
* @param windowText Optional text found in the window.
* @param x The X coordinate of the new position.
* @param y The Y coordinate of the new position.
* @param width The new width of the window.
* @param height The new height of the window.
*
* @returns 1 if successful, 0 otherwise.
*
* @example
* ```typescript
* import { WinMoveSync } from '@ahmic/autoit-js';
*
* WinMoveSync('Untitled - Notepad', '', 100, 100, 800, 600);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinMove.htm
*/
export declare function WinMoveSync(windowTitle: string, windowText: string | undefined, x: number, y: number, width?: number, height?: number): number;
/**
* Moves a window to a specified position and resizes it.
*
* @param windowTitle The title of the window to move.
* @param windowText Optional text found in the window.
* @param x The X coordinate of the new position.
* @param y The Y coordinate of the new position.
* @param width The new width of the window.
* @param height The new height of the window.
*
* @returns A promise that resolves to 1 if successful, or 0 otherwise.
*
* @example
* ```typescript
* import { WinMove } from '@ahmic/autoit-js';
*
* await WinMove('Untitled - Notepad', '', 100, 100, 800, 600);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinMove.htm
*/
export declare function WinMove(windowTitle: string, windowText: string | undefined, x: number, y: number, width?: number, height?: number): Promise<number>;