Can be called from an Obey file, to halt execution of that file until a specified condition is met.
WaitUntil is a small program for RISC OS computers which can be called from an Obey file, to halt execution of that file until a specified condition is met. The program sets itself up as a normal WIMP application, though without any windows, etc, and just polls the WIMP, testing if the condition has been satisfied each time control returns. Once satisfied, the program quits, and execution of the calling Obey file continues as normal.
Adding a -s switch to the command line causes WaitUntil to single task, and in this way it can also be called from TaskObey files.
Available conditions are as follows:
WaitUntil Exists object
Waits until the specified object (file, directory or image file) exists.
WaitUntil Set variable
Waits until the specified system variable is set.
WaitUntil Running application
Waits until the specified application is running (ie registered with the WIMP)
WaitUntil Open file
Waits until the specified file is open.
WaitUntil Closed file
Waits until the specified file is closed.
WaitUntil Elapsed time
Waits until the specified amount of time has passed
In addition, the reverse of all the above can be tested for (with the exception of 'Elapsed'), by prefixing the condition with an explanation mark (!), as in:
WaitUntil !Set variable
- which would wait until the specified variable is unset.