@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
41 lines (40 loc) • 1.33 kB
TypeScript
/**
* Retrieves the handle of a window as a string.
*
* @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 string.
*
* @example
* ```typescript
* import { WinGetHandleAsTextSync } from '@ahmic/autoit-js';
*
* const handleText = WinGetHandleAsTextSync('Untitled - Notepad');
*
* console.log(handleText); // Output: "0x00123456" (example output)
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinGetHandle.htm
*/
export declare function WinGetHandleAsTextSync(windowTitle: string, windowText?: string): string;
/**
* Retrieves the handle of a window as a string.
*
* @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 string.
*
* @example
* ```typescript
* import { WinGetHandleAsText } from '@ahmic/autoit-js';
*
* const handleText = await WinGetHandleAsText('Untitled - Notepad');
*
* console.log(handleText); // Output: "0x00123456" (example output)
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinGetHandle.htm
*/
export declare function WinGetHandleAsText(windowTitle: string, windowText?: string): Promise<string>;