UNPKG

@ahmic/autoit-js

Version:
41 lines (40 loc) 1.33 kB
/** * 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>;