UNPKG

@ahmic/autoit-js

Version:
45 lines (44 loc) 1.64 kB
/** * Retrieves the text from a control in a window. * * @param windowTitle The title of the window to access. * @param windowText Optional text found in the window. * @param controlId The ID of the control to retrieve text from. * @param characterCount The maximum number of characters to retrieve. Default is 1024. * * @returns The text of the control. * * @example * ```typescript * import { ControlGetTextSync } from '@ahmic/autoit-js'; * * const text = ControlGetTextSync('Untitled - Notepad', '', 'Edit1'); * * console.log(text); // Output: "Sample text" * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetText.htm */ export declare function ControlGetTextSync(windowTitle: string, windowText: string, controlId: string, characterCount?: number): string; /** * Retrieves the text from a control in a window. * * @param windowTitle The title of the window to access. * @param windowText Optional text found in the window. * @param controlId The ID of the control to retrieve text from. * @param characterCount The maximum number of characters to retrieve. Default is 1024. * * @returns A promise that resolves to the text of the control. * * @example * ```typescript * import { ControlGetText } from '@ahmic/autoit-js'; * * const text = await ControlGetText('Untitled - Notepad', '', 'Edit1'); * * console.log(text); // Output: "Sample text" * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ControlGetText.htm */ export declare function ControlGetText(windowTitle: string, windowText: string, controlId: string, characterCount?: number): Promise<string>;