Waiting for other threads

Sometimes you’ll want your scripts to pause until some other thread or process has been launched, so it has the services it needs to continue. For example, if you try to launch certain network apps from UserBootscript, the net_server may not be ready before they’re launched. To rectify this, use the waitfor command followed by the name of a thread to wait for. For example:

waitfor net_server
/path/to/BeAIM &

Note that waitfor needs the actual name of the thread (i.e. StyledEdit or CDPlayer), and not some obscure thread number.



No comments so far.

(comments are closed)