Purpose: Waits for a period (set by the DELAY: command) for the text
<string> to be seen.
Use: Pauses the script to wait for the <string>. The "case" of the text must be correct. The command reads in all characters until the <string> is found.
Examples: WAITFOR:Alan >
Related commands: DELAY:
TYPE:<string>[control code]
---------------------------
Purpose: Sends the text in the string to the serial port.
Use: Sends the string just as though it were typed into a terminal program.
Control codes may be sent by specifying the decimal number of the code in
square brackets. A carraige return code will be added to the end of the line.
System variables can be used in {} brackets. This feature is useful when
a BBS requires the last listed message number in the list command since
a FILESCAN: will extract this for you from an old saved "List" file and
save it as {OldList$Num}. See the FILESCAN: command for further details.
ComLink will try to send the whole string within a time period set by delay.
A timeout will be generated if the string cannot be sent (due to the output
buffer on the serial port failing to empty). See the DELAY: command.
Examples: TYPE:C GB7IMB
TYPE:CONM TRANS[13]MON OFF
(Note [13] is the code for a carriage return)
Related commands: DELAY:
MYPROMPT:<string>|<length>
--------------------------
Purpose: Tells ComLink what character sequence to look for to recognise a
command prompt from the PMS/BBS and optionally the length.
Use: Normally used near the begining of a program. When a READ: command is
used, ComLink requests messages one at a time. ComLink needs to know how to
recognise the end of a message so this command tells it what to look for.
The complete prompt does not need to be specified, just the last few
characters, in practice just > could be specified, but this character could
occur in a message, so it is best to specify as many characters as you can.
Most BBSs send the time as part of the prompt.... dont try to include this
as it changes, to cater for this wild card characters # are allowed.
Control codes can be incorporated but [13] (carraige return) can ONLY be
used at the end of the line.
If your prompt is short, then the chance of it occuring in read messages
is significant. To reduce the probability of it being seen in a message
you can specify the total length of your prompt from the start of the
prompt line to the end, INCLUDING the carraige return (if a part of your
prompt!). The length can be added after your prompt string preceded by the
| character (ASCII 124).
eg if your prompt is just:-
>[13]
where [13] represents "Carraige return":-
then use:- MYPROMPT:>[13]|2 or MYPROMPT:>|2
Note that the characters specified do not have to be the whole prompt,
just the last bit, but the length must be that of the whole prompt.
eg. for:-
GB7SUT - >[13]
you can use MYPROMPT:- >[13]|11
With a PMS a carraige return is NOT added to the end of the prompt so the
command would be:-
MYPROMPT:cmd:|4
Examples: MYPROMPT:Alan >
MYPROMPT:##:## Alan >[13]
MYPROMPT:>[13]|2
Related commands: READ:
ICON:<colour>
-------------
Purpose: Changes the background colour of the ComLink icon on the bar.
Use: Lets the user know when a certain part of the script has been reached.
Valid colours are :- BLUE,YELLOW,GREEN,RED,WHITE,CREAM,AMBER
The colours must be specified in upper case, an unrecogised or unspecified
colour will set the icon colour to grey. The colour can be abreviated to 3
letters.
Examples: ICON:AMBER
ICON:YEL
Related commands: None
DELAY:<number>
--------------
Purpose: Sets the timeout delay in seconds.
Use: Commands TYPE:, WAITFOR:, READ:, UPLOAD: and SCANLIST: will cause a
timeout to be generated within ComLink if certain actions have not happened
within a period of <delay> seconds.
In the case of the TYPE command, all characters in the specified string must
be output within <delay> seconds, the "timer" is started when the command
execution has begun.
The WAITFOR: command when executing, similarly starts a timer, after <delay>
seconds a tiemout will occur if the specified string has not been read in.
The SCANLIST: and READ: commands start and stop the timer several times, the worst situation that must be allowed for, is during the reading of a message,
where the whole message must have been read in, saved and a new "prompt"
received. (The prompt is setup using the command MYPROMPT:)
UPLOAD: sets the timer going when it is trying to send files, the timer
starts when the file is opened and stops when the last character in the file
has been sent. The timer is then reset and ComLink waits again for the
prompt.
A timeout will cause the program to stop if no ONERROR: command is used,
otherwaise execution of the script will continue with the instruction after
the ONERROR: command.
Only one ONERROR: jump can be performed, jumps will only be performed in a
forwards direction. ie a jump back to any previous line will not be allowed
and the script program will end.
The delay command can be used many times within a script, indeed, it is
sensible to do so. If you are talking only to your TNC, then a long delay is
not required, since the response will be fast.
Typically set DELAY: to:-
20 when communicating just with the TNC.
200 when linked to a BBS but not reading messages.
900 when linked to a BBS and reading messages.
(Yes, it did take nearly 15 minutes one day to read a message!)
Example: DELAY:600
Related commands: TYPE: READ: WAITFOR: ONERROR: SCANLIST: