Function WinWaitActiveByHandle

  • Waits for a window to become active.

    Parameters

    • windowHandle: bigint

      The handle of the window to wait for.

    • timeout: number = 0

      The timeout in seconds. Defaults to 0 (wait indefinitely).

    Returns number

    1 if the window becomes active, 0 if the timeout is reached.

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

    const windowHandle = WinGetHandle('Untitled - Notepad');
    WinWaitActiveByHandle(windowHandle, 10);