@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
41 lines (40 loc) • 1.23 kB
TypeScript
/**
* Checks if a window exists.
*
* @param windowHandle The handle of the window to search for.
*
* @returns True if the window exists, false otherwise.
*
* @example
* ```typescript
* import { WinExistsByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';
*
* const handle = WinGetHandleSync('Untitled - Notepad');
* const exists = WinExistsByHandleSync(handle);
*
* console.log(exists); // Output: true or false
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinExists.htm
*/
export declare function WinExistsByHandleSync(windowHandle: bigint): boolean;
/**
* Checks if a window exists.
*
* @param windowHandle The handle of the window to search for.
*
* @returns A promise that resolves to true if the window exists, or false otherwise.
*
* @example
* ```typescript
* import { WinExistsByHandle, WinGetHandle } from '@ahmic/autoit-js';
*
* const handle = await WinGetHandle('Untitled - Notepad');
* const exists = await WinExistsByHandle(handle);
*
* console.log(exists); // Output: true or false
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinExists.htm
*/
export declare function WinExistsByHandle(windowHandle: bigint): Promise<boolean>;