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:
- Use the TimeDelay command. Note that the time interval must be specified.
- Use the RunWait command. Not always applicable.
- IntControl(36, p1, p2, 0, 0) (32-bit version only). Waits until an application is waiting for user input.
- 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: W13164Filename: Getting WinBatch to Wait - Pause.txt