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.
The result of the command as a string.
import { ControlListViewByHandle, ListViewCommand, ControlGetHandle, WinGetHandle } from '@ahmic/autoit-js';
const windowHandle = WinGetHandle('Untitled - Notepad');
const controlHandle = ControlGetHandle(windowHandle, 'SysListView32');
const itemCount = ControlListViewByHandle(windowHandle, controlHandle, ListViewCommand.GetItemCount);
console.log(itemCount); // Output: "5"
Interacts with a ListView control in a window.