UNPKG

@ahmic/autoit-js

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