The handle of the window to access.
The handle of the ListView control to interact with.
The command to execute on the ListView control. See ListViewCommand
for details.
Optional parameter for the command.
Optional parameter for the command.
The maximum number of characters to retrieve. Default is 1024.
A promise that resolves to the result of the command as a string.
import { ControlListViewByHandle, ListViewCommand, ControlGetHandle, WinGetHandle } from '@ahmic/autoit-js';
const windowHandle = await WinGetHandle('Untitled - Notepad');
const controlHandle = await ControlGetHandle(windowHandle, 'SysListView32');
const itemCount = await ControlListViewByHandle(windowHandle, controlHandle, ListViewCommand.GetItemCount);
console.log(itemCount); // Output: "5"
Interacts with a ListView control in a window.