89
C
APTURE CAPTURE <filename>,[APPEND[,DEBUG]]
CAPTURE OFF
Begins saving received characters to a specified file. Use CAPTURE OFF
to stop the capture and save the file. E.g.
CAPTURE “C:\Documents\Logs\log15”
…
CAPTURE OFF
To add more captured information to a file that exists already, use the
APPEND modifier. E.g.
CAPTURE “C:\Documents\Logs\log”, APPEND
This simply adds the newly captured information onto the end of the old.
You may find CAPTURE useful when reading your e-mail messages on a
remote system. E.g.
CAPTURE “C:\Email\messages”
SENDWAIT 600 “readmail” , “ready:” GOTO fail5min
CAPTURE OFF
Sends “readmail” to the remote system - a command to ‘read my messages’
- and captures the resulting text. In this system, the remote machine
signals the end of the mail by a return to the “ready:” prompt. If this
happens within 5 minutes, the capture is terminated, if not, the script
jumps to the ‘fail5min’ label.
Note: To store control characters in the captured file, e.g. <13> or <8>,
use the DEBUG modifier. E.g.
CAPTURE “C:\Scripting\log” , DEBUG
You can combine the two modifiers together by separating them with a
comma. E.g.
CAPTURE “C:\Captures\log2” , APPEND , DEBUG
C
ATCH CATCH [INCLUDE/EXCLUDE] ,<string>, <variable>, <timeout>,
<maxlength> GOTO <label>
Stores incoming information to the specified variable. E.g.
CATCH INCLUDE, “OK” , R$ , 60 , 20 GOTO anerror
This captures incoming data to the variable R$. The capturing will stop
after a time of <timeout> (in this case 60 half-seconds), when the string
“OK” is received, or when twenty characters have been received. The script
jumps to the label (i.e. ‘anerror’) if the given string is not received before
either the <timeout> value or the maximum number of characters
(<maxlength>) is reached. Use INCLUDE if you want <string> to be
included as part of the variable, or EXCLUDE if you do not.
C
HAIN CHAIN <filename>
Starts a new script, clearing all variables first. E.g
CHAIN “C:\Documents\Scripts\script3.scr”
starts ‘script3.scr’ running, whilst clearing all the variables set up in any
previous scripts.