@ahmic/autoit-js
    Preparing search index...

    Function ControlTreeViewByHandle

    • Interacts with a tree view control in a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      • controlHandle: bigint

        The handle of the tree view control to interact with.

      • command: TreeViewCommand

        The command to send to the tree view control.

      • option1: string = ''

        Optional parameter for the command.

      • option2: string = ''

        Optional parameter for the command.

      • characterCount: number = 1024

      Returns Promise<string>

      A promise that resolves to the result of the command as a string.

      import { ControlTreeViewByHandle, WinGetHandle, ControlGetHandle } from '@ahmic/autoit-js';

      const windowHandle = await WinGetHandle('Untitled - Notepad');
      const controlHandle = await ControlGetHandle(windowHandle, 'SysTreeView32');
      const result = await ControlTreeViewByHandle(windowHandle, controlHandle, 'GetItemCount');

      console.log(result); // Output: "5"