UNPKG

@ahmic/autoit-js

Version:
43 lines (42 loc) 1.44 kB
/** * Gets the handle of a control in a window. * * @param windowHandle The handle of the window to access. * @param controlId The control to get the handle of. * * @returns The handle of the control. * * @example * ```typescript * import { ControlGetHandleSync, WinGetHandleSync } from '@ahmic/autoit-js'; * * const windowHandle = WinGetHandleSync('Untitled - Notepad'); * const controlHandle = ControlGetHandleSync(windowHandle, 'Edit1'); * * console.log(controlHandle); // Output: 0x0000000000000001 * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm */ export declare function ControlGetHandleSync(windowHandle: bigint, controlId: string): bigint; /** * Gets the handle of a control in a window. * * @param windowHandle The handle of the window to access. * @param controlId The control to get the handle of. * * @returns A promise that resolves to the handle of the control. * * @example * ```typescript * import { ControlGetHandle, WinGetHandle } from '@ahmic/autoit-js'; * * const windowHandle = await WinGetHandle('Untitled - Notepad'); * const controlHandle = await ControlGetHandle(windowHandle, 'Edit1'); * * console.log(controlHandle); // Output: 0x0000000000000001 * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm */ export declare function ControlGetHandle(windowHandle: bigint, controlId: string): Promise<bigint>;