@ahmic/autoit-js
Version: 
Node.js bindings for AutoItX3.dll
43 lines (42 loc) • 1.59 kB
TypeScript
/**
 * Gets the handle of a control in a window as a hexadecimal string.
 *
 * @param windowTitle The title of the window to access.
 * @param windowText Optional text found in the window.
 * @param controlId The control to get the handle for.
 *
 * @returns The handle of the control as a hexadecimal string.
 *
 * @example
 * ```typescript
 * import { ControlGetHandleAsTextSync } from '@ahmic/autoit-js';
 *
 * const handle = ControlGetHandleAsTextSync('Untitled - Notepad', '', 'Edit1');
 *
 * console.log(handle); // Output: "0x0000000000000001"
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm
 */
export declare function ControlGetHandleAsTextSync(windowTitle: string, windowText: string | undefined, controlId: string): string;
/**
 * Gets the handle of a control in a window as a hexadecimal string.
 *
 * @param windowTitle The title of the window to access.
 * @param windowText Optional text found in the window.
 * @param controlId The control to get the handle for.
 *
 * @returns A promise that resolves to the handle of the control as a hexadecimal string.
 *
 * @example
 * ```typescript
 * import { ControlGetHandleAsText } from '@ahmic/autoit-js';
 *
 * const handle = await ControlGetHandleAsText('Untitled - Notepad', '', 'Edit1');
 *
 * console.log(handle); // Output: "0x0000000000000001"
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm
 */
export declare function ControlGetHandleAsText(windowTitle: string, windowText: string | undefined, controlId: string): Promise<string>;