UNPKG

@ahmic/autoit-js

Version:
41 lines (40 loc) 1.32 kB
/** * Gets the ID of the control that has keyboard focus in a window. * * @param windowTitle The title of the window to access. * @param windowText Optional text found in the window. * * @returns The ID of the control that has keyboard focus. * * @example * ```typescript * import { ControlGetFocusSync } from '@ahmic/autoit-js'; * * const className = ControlGetFocusSync('Untitled - Notepad'); * * console.log(className); // Output: "Edit1" * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetFocus.htm */ export declare function ControlGetFocusSync(windowTitle: string, windowText?: string): string; /** * Gets the ID of the control that has keyboard focus in 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 ID of the control that has keyboard focus. * * @example * ```typescript * import { ControlGetFocus } from '@ahmic/autoit-js'; * * const className = await ControlGetFocus('Untitled - Notepad'); * * console.log(className); // Output: "Edit1" * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetFocus.htm */ export declare function ControlGetFocus(windowTitle: string, windowText?: string): Promise<string>;