Function WinWaitActive

  • Waits for a window to become active.

    Parameters

    • windowTitle: string

      The title of the window to wait for.

    • windowText: string = ''

      Optional text found in the window.

    • 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 { WinWaitActive } from '@ahmic/autoit-js';

    WinWaitActive('Untitled - Notepad', '', 10);