Function ProcessWait

  • Waits for a process to exist.

    Parameters

    • process: string

      The name of the process to wait for.

    • timeout: number = 0

      The timeout in seconds. Default is 0 (wait indefinitely).

    Returns number

    1 if the process exists, 0 if the timeout is reached.

    import { ProcessWait } from '@ahmic/autoit-js';

    ProcessWait('notepad.exe', 10);