|
|
|
WAITSIGNAL
Syntax: #WAITSIG signal timeout {match-commands} {timeout-commands}
Related: #SIGNAL
Suspends the current thread and wait until the specified signal is fired. If timeout is specified, then it is the maximum number of milliseconds to wait. If the timeout expires, the rest of the thread's script is aborted.
The match-commands and timeout-commands are optional command blocks that should be executed when the signal is received, or when the timeout occurs. If these are omitted, then the script will continue with the next statement when the signal is received, and will exit the script if a timeout occurs. |
User comments |
jed: Wed Dec 29, 2010 6:14 am |
|
When using waitsignal, you first have to specify the name of the signal you are waiting for, then in whatever script you want to trigger off of you need to put in a #signal command with the name as the next expression. Then at some point you have to reset your #signal.
So for example in an alias you have
#waitsignal fred
then as a command in a trigger you have
#signal fred <= this will fire the signal and your alias will continue to run
Then you have to
#signal fred 0 <= this will reset your signal |
|
|
|