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

    Function WinSetStateByHandle

    • Changes the state of a window.

      Parameters

      • windowHandle: bigint

        The handle of the window.

      • flags: StateFlag

        The state flags to apply. See StateFlag for details.

      Returns Promise<number>

      A promise that resolves to 1 if successful, or 0 otherwise.

      import { WinSetStateByHandle, StateFlag, WinGetHandle } from '@ahmic/autoit-js';

      const windowHandle = await WinGetHandle('Untitled - Notepad');

      await WinSetStateByHandle(windowHandle, StateFlag.Minimize);