@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
39 lines (38 loc) • 1.31 kB
TypeScript
/**
* Waits for a window to close.
*
* @param windowTitle The title of the window to wait for.
* @param windowText Optional text found in the window.
* @param timeout The timeout in seconds. Default is 0 (wait indefinitely).
*
* @returns 1 if the window closes, 0 if the timeout is reached.
*
* @example
* ```typescript
* import { WinWaitCloseSync } from '@ahmic/autoit-js';
*
* WinWaitCloseSync('Untitled - Notepad', '', 10);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinWaitClose.htm
*/
export declare function WinWaitCloseSync(windowTitle: string, windowText?: string, timeout?: number): number;
/**
* Waits for a window to close.
*
* @param windowTitle The title of the window to wait for.
* @param windowText Optional text found in the window.
* @param timeout The timeout in seconds. Default is 0 (wait indefinitely).
*
* @returns A promise that resolves to 1 if the window closes, 0 if the timeout is reached.
*
* @example
* ```typescript
* import { WinWaitClose } from '@ahmic/autoit-js';
*
* await WinWaitClose('Untitled - Notepad', '', 10);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinWaitClose.htm
*/
export declare function WinWaitClose(windowTitle: string, windowText?: string, timeout?: number): Promise<number>;