home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / am_radio / comlink350 / Manual / Script_Man / part3 < prev    next >
Encoding:
Text File  |  1991-12-15  |  5.5 KB  |  160 lines

  1.  
  2. Command Descriptions.
  3. =====================
  4.  
  5. WAITFOR:<string>
  6. ----------------
  7.  
  8. Purpose: Waits for a period (set by the DELAY: command) for the text
  9. <string> to be seen.
  10.  
  11. 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.
  12.  
  13. Examples:  WAITFOR:Alan >
  14.  
  15. Related commands: DELAY:
  16.  
  17.  
  18. TYPE:<string>[control code]
  19. ---------------------------
  20.  
  21. Purpose: Sends the text in the string to the serial port.
  22.  
  23. Use: Sends the string just as though it were typed into a terminal program.
  24.  
  25. Control codes may be sent by specifying the decimal number of the code in
  26. square brackets. A carraige return code will be added to the end of the line.
  27.  
  28. System variables can be used in {} brackets. This feature is useful when
  29. a BBS requires the last listed message number in the list command since
  30. a FILESCAN: will extract this for you from an old saved "List" file and
  31. save it as {OldList$Num}. See the FILESCAN: command for further details.
  32.  
  33. ComLink will try to send the whole string within a time period set by delay.
  34. A timeout will be generated if the string cannot be sent (due to the output
  35. buffer on the serial port failing to empty). See the DELAY: command.
  36.  
  37. Examples:  TYPE:C GB7IMB
  38.            TYPE:CONM TRANS[13]MON OFF
  39.  
  40. (Note [13] is the code for a carriage return)
  41.  
  42. Related commands: DELAY:
  43.  
  44.  
  45. MYPROMPT:<string>|<length>
  46. --------------------------
  47.  
  48. Purpose: Tells ComLink what character sequence to look for to recognise a
  49. command prompt from the PMS/BBS and optionally the length.
  50.  
  51. Use: Normally used near the begining of a program. When a READ: command is
  52. used, ComLink requests messages one at a time. ComLink needs to know how to
  53. recognise the end of a message so this command tells it what to look for.
  54. The complete prompt does not need to be specified, just the last few
  55. characters, in practice just > could be specified, but this character could
  56. occur in a message, so it is best to specify as many characters as you can.
  57. Most BBSs send the time as part of the prompt.... dont try to include this
  58. as it changes, to cater for this wild card characters # are allowed.
  59.  
  60. Control codes can be incorporated but [13] (carraige return) can ONLY be
  61. used at the end of the line.
  62.  
  63. If your prompt is short, then the chance of it occuring in read messages
  64. is significant. To reduce the probability of it being seen in a message
  65. you can specify the total length of your prompt from the start of the
  66. prompt line to the end, INCLUDING the carraige return (if a part of your 
  67. prompt!). The length can be added after your prompt string preceded by the
  68.  | character (ASCII 124).
  69. eg if your prompt is just:-
  70.  
  71. >[13]
  72.  
  73. where [13] represents "Carraige return":-
  74.  
  75. then use:-  MYPROMPT:>[13]|2    or   MYPROMPT:>|2
  76.  
  77. Note that the characters specified do not have to be the whole prompt,
  78. just the last bit, but the length must be that of the whole prompt.
  79. eg. for:-
  80.  
  81. GB7SUT - >[13]
  82.  
  83. you can use MYPROMPT:- >[13]|11
  84.  
  85. With a PMS a carraige return is NOT added to the end of the prompt so the
  86. command would be:-
  87.  
  88. MYPROMPT:cmd:|4
  89.  
  90. Examples: MYPROMPT:Alan >
  91.           MYPROMPT:##:## Alan >[13]
  92.           MYPROMPT:>[13]|2
  93.  
  94. Related commands: READ:
  95.  
  96. ICON:<colour>
  97. -------------
  98.  
  99. Purpose: Changes the background colour of the ComLink icon on the bar.
  100.  
  101. Use: Lets the user know when a certain part of the script has been reached.
  102. Valid colours are :-  BLUE,YELLOW,GREEN,RED,WHITE,CREAM,AMBER
  103.  
  104. The colours must be specified in upper case, an unrecogised or unspecified
  105. colour will set the icon colour to grey. The colour can be abreviated to 3
  106. letters.
  107.  
  108. Examples:  ICON:AMBER
  109.            ICON:YEL
  110.  
  111. Related commands: None
  112.  
  113.  
  114. DELAY:<number>
  115. --------------
  116.  
  117. Purpose: Sets the timeout delay in seconds.
  118.  
  119. Use: Commands TYPE:, WAITFOR:, READ:, UPLOAD: and SCANLIST: will cause a
  120. timeout to be generated within ComLink if certain actions have not happened
  121. within a period of <delay> seconds.
  122.  
  123. In the case of the TYPE command, all characters in the specified string must
  124. be output within <delay> seconds, the "timer" is started when the command
  125. execution has begun.
  126.  
  127. The WAITFOR: command when executing, similarly starts a timer, after <delay>
  128. seconds a tiemout will occur if the specified string has not been read in.
  129.  
  130. 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,
  131. where the whole message must have been read in, saved and a new "prompt"
  132. received. (The prompt is setup using the command MYPROMPT:)
  133.  
  134. UPLOAD: sets the timer going when it is trying to send files, the timer
  135. starts when the file is opened and stops when the last character in the file
  136. has been sent. The timer is then reset and ComLink waits again for the
  137. prompt.
  138.  
  139. A timeout will cause the program to stop if no ONERROR: command is used,
  140. otherwaise execution of the script will continue with the instruction after
  141. the ONERROR: command.
  142.  
  143. Only one ONERROR: jump can be performed, jumps will only be performed in a
  144. forwards direction. ie a jump back to any previous line will not be allowed
  145. and the script program will end.
  146.  
  147. The delay command can be used many times within a script, indeed, it is
  148. sensible to do so. If you are talking only to your TNC, then a long delay is
  149. not required, since the response will be fast.
  150.  
  151. Typically set DELAY: to:-
  152.  20 when communicating just with the TNC.
  153.  200 when linked to a BBS but not reading messages.
  154.  900 when linked to a BBS and reading messages.
  155. (Yes, it did take nearly 15 minutes one day to read a message!)
  156.  
  157. Example: DELAY:600
  158.  
  159. Related commands: TYPE: READ: WAITFOR: ONERROR: SCANLIST:
  160.