Contents | Index | < Browse | Browse >
WAIT SYSTEM Name|~Name Timeout
WAIT will wait until the specified SYSTEM items (FILE, PORT etc) are
ready or until the timeout is reached. If the item is already
ready, the command will return immediately.
This command will set the $$RETCODE internal variable to show you if
the given item appeared within the TimeOut limit you specified. 0 = OK.
This command is useful when starting up programs, or when writing to
files. It does the same job as the IFEXISTS command, but in a different
way.
You can also have it's negative form by putting a ~ in front of the
Name of the item you want to wait for.
The Timeout is in ticks (1/50th of a second)
examples :
WAIT PORT Gui4Cli 100
- wait for a public message port called "Gui4Cli". If it hasn't appeared
in 100 ticks, return, setting $$RETCODE to an error status (i.e. over 0).
WAIT SCREEN ~MyScreen 10
- wait for a public screen named "MyScreen" to close. If it hasn't
disappered in 10 ticks return, setting $$RETCODE to over 0