Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Getting WinBatch to Wait/Pause

Keywords:        delay wait pause run runwait loop check

The options for pausing a script while the application continues processing are:

  1. Use the TimeDelay command. Note that the time interval must be specified.
  2. Use the RunWait command. Not always applicable.
  3. IntControl(36, p1, p2, 0, 0) (32-bit version only). Waits until an application is waiting for user input.
  4. Learn something about the application which is trackable, i.e., a dialog box is displayed when printing. Write a Loop in the script which checks for the existence of the dialog box. When the dialog box is no longer there the script will continue.

Things you can check for: files that exist, windows, dialog boxes, system resource percents etc.

Example of a while loop checking for a window title:

      while WinExist("Notepad")  
            delay(2)

      endwhile

Article ID:   W13164
Filename:   Getting WinBatch to Wait - Pause.txt