The handle of the window to access.
The handle of the tree view control to interact with.
The command to send to the tree view control.
Optional parameter for the command.
Optional parameter for the command.
The result of the command as a string.
import { ControlTreeViewByHandle, WinGetHandle, ControlGetHandle } from '@ahmic/autoit-js';
const windowHandle = WinGetHandle('Untitled - Notepad');
const controlHandle = ControlGetHandle(windowHandle, 'SysTreeView32');
const result = ControlTreeViewByHandle(windowHandle, controlHandle, 'GetItemCount');
console.log(result); // Output: "5"
Interacts with a tree view control in a window.