@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
39 lines (38 loc) • 1.2 kB
TypeScript
/**
* Checks if a window exists.
*
* @param windowTitle The title of the window to search for.
* @param windowText Optional text found in the window.
*
* @returns True if the window exists, false otherwise.
*
* @example
* ```typescript
* import { WinExistsSync } from '@ahmic/autoit-js';
*
* const exists = WinExistsSync('Untitled - Notepad');
* console.log(exists); // Output: true or false
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinExists.htm
*/
export declare function WinExistsSync(windowTitle: string, windowText?: string): boolean;
/**
* Checks if a window exists.
*
* @param windowTitle The title of the window to search for.
* @param windowText Optional text found in the window.
*
* @returns A promise that resolves to true if the window exists, or false otherwise.
*
* @example
* ```typescript
* import { WinExists } from '@ahmic/autoit-js';
*
* const exists = await WinExists('Untitled - Notepad');
* console.log(exists); // Output: true or false
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinExists.htm
*/
export declare function WinExists(windowTitle: string, windowText?: string): Promise<boolean>;