@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
41 lines (40 loc) • 1.21 kB
TypeScript
/**
* Retrieves the handle of a window.
*
* @param windowTitle The title of the window to access.
* @param windowText Optional text found in the window.
*
* @returns The handle of the window as a bigint.
*
* @example
* ```typescript
* import { WinGetHandleSync } from '@ahmic/autoit-js';
*
* const handle = WinGetHandleSync('Untitled - Notepad');
*
* console.log(handle); // Output: 123456n
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinGetHandle.htm
*/
export declare function WinGetHandleSync(windowTitle: string, windowText?: string): bigint;
/**
* Retrieves the handle of a window.
*
* @param windowTitle The title of the window to access.
* @param windowText Optional text found in the window.
*
* @returns A promise that resolves to the handle of the window as a bigint.
*
* @example
* ```typescript
* import { WinGetHandle } from '@ahmic/autoit-js';
*
* const handle = await WinGetHandle('Untitled - Notepad');
*
* console.log(handle); // Output: 123456n
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinGetHandle.htm
*/
export declare function WinGetHandle(windowTitle: string, windowText?: string): Promise<bigint>;