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

  1.  
  2. Script files
  3. ------------
  4. So you've set changed the Config file and saved it. Now what can you do?
  5. Well errrr.. actually nothing until you either write a script file or change
  6. one of the ones provided! It'll be worth it in the end though!
  7.  
  8. What is a script file? Well it's like a program, ComLink looks at each line
  9. in the script sequentially and does what you tell it. Take a look at the
  10. file SCRIPT within the !ComLink application. (To do this hold down SHIFT and
  11. double click on the !Comlink icon). Load !Edit as normal, drag the file
  12. SCRIPT file to the Edit icon on the bar. Most of the lines start with a
  13. command word followed by a colon, most are further followed by some text. I
  14. have tried to make the commands self explanatory as best I can. Further
  15. information is provided on each command later in this document, but before
  16. you are overwhelmed with the apparent complexity of the program, look at the
  17. TYPE: command. All this does is send the text after the command to the
  18. serial port. Just as though it had been typed at the keyboard. Simple eh?
  19.  
  20. To handle text sent back from the TNC there is a command WAITFOR:, which
  21. simply causes characters to be taken from the TNC until exactly the text
  22. given after the command has been seen.
  23.  
  24. TYPE: and WAITFOR: are probably the two commands you will use most.
  25.  
  26. When a script program is running, any terminal programs (other than the one
  27. incorporated into ComLink) must be disabled or closed down (quit), since
  28. otherwise they may steal characters from the serial port and affect the
  29. operation of ComLink.
  30.  
  31. Creating a script
  32. -----------------
  33.  
  34. Scripts can be created using the !Edit wordprocessor, or an old one can be
  35. loaded into !Edit, saved under another name and modified. Script files have
  36. their own "type", so normal text files must have their filetype changed
  37. before ComLink will run them.
  38.  
  39. There are two ways of changing the file type, use the *command (*Settype) or
  40. use the application provided called !Convert. To do this load !Convert by
  41. double clicking it's icon. Drag the text file to the Convert icon on the
  42. bar, hey presto the file type changes. !Convert will also change script
  43. files back to text files by the same method.
  44.  
  45. Script files have been given the filetype 56E (hex.)
  46.  
  47.  
  48. SCRIPT COMMANDS
  49. ===============
  50.  
  51. The following script commands may be used:-
  52.  
  53. START:<time>
  54. TYPE:<text>
  55. WAITFOR:<text>
  56. DELAY:<number>
  57. READ:<text>
  58. UPLOAD:<comment>
  59. REPORT:<comment>
  60. MYPROMPT:<wildcarded text>|<length>
  61. SAVELIST:<comment>
  62. FINISHED:<comment>
  63. ONERROR:<comment>
  64. ICON:<colour>
  65. SCANLIST:<text1><:text2>....<:text9>
  66. BREAK:<comment>
  67. ENDLIST:<text>
  68. MONITOR:<text>
  69. DIRUP:<text>
  70. DIRDOWN:<text>
  71. FILESCAN:<text>
  72. OSCLI:<text>
  73. APPEND:<text>
  74. KILL:<comment>
  75. DAYTIME:<number>
  76. FLUSH:<text>
  77. LOOPIF:<text>
  78. UNTIL:<text>
  79.  
  80. The following restrictions apply to the use of commands:-
  81.  
  82. 1) Commands must be in capital letters.
  83. 2) Commands may be abreviated to 4 letters.
  84. 3) Commands must end with a colon before the <text> etc begins.
  85. 4) Only one command per line is allowed.
  86. 5) Commands must start the line.
  87.  
  88. If these rules are ignored, or if the command is not a valid one the line
  89. will be treated as a comment (eg like a BASIC REM statement).
  90.  
  91. Text received by the serial port is assumed to have a line end marker of
  92. "carriage return" ie a control code of value 13 (decimal). (Nb version 1.00
  93. assumed lines ended with a line feed)
  94.  
  95. All outgoing text lines are ended automatically by ComLink with a "carraige
  96. return" code.
  97.  
  98. Where no text etc is required by a command (eg UPLOAD:), then a comment may
  99. be put on the rest of that line, this will be ignored by the program.
  100.  
  101. Script files can only be 150 lines long, including comments. This should be
  102. enough for most applications. Lines can only be 100 characters long.
  103.  
  104. When text files are created by a ComLink script and they are being written
  105. to, a special file type is allocated to the file (type &56C), this is the
  106. same as the normal text type icon except the "pen" in the icon is red. The
  107. icon will be switched back to the normal text icon when the file is closed.
  108.  
  109.