Retrieves the text from a window.
The handle of the window to access.
The maximum number of characters to retrieve. Default is 1024.
A promise that resolves to the text of the window as a string.
import { WinGetTextByHandle, WinGetHandle } from '@ahmic/autoit-js';const windowHandle = await WinGetHandle('Untitled - Notepad');const text = await WinGetTextByHandle(windowHandle);console.log(text); // Output: "Example text" Copy
import { WinGetTextByHandle, WinGetHandle } from '@ahmic/autoit-js';const windowHandle = await WinGetHandle('Untitled - Notepad');const text = await WinGetTextByHandle(windowHandle);console.log(text); // Output: "Example text"
https://www.autoitscript.com/autoit3/docs/functions/WinGetText.htm
Retrieves the text from a window.