home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / c / comlink / Manual / Script_Man / 3_Commands < prev   
Encoding:
Text File  |  1993-11-22  |  33.6 KB  |  939 lines

  1.  
  2. Script Command Descriptions (Alphabetical order)
  3. ================================================
  4.  
  5. ----------------------------------------------------------------------------
  6. APPEND:<text>
  7. ----------------------------------------------------------------------------
  8.  
  9. Purpose: Adds some text to the end of an upload file.
  10.  
  11. Use: The <text> will be sent at the end of each upload file. The upload file
  12. must NOT contain the end of message code, eg /ex or CTRL/Z, these MUST be
  13. put at the end of the APPEND: command.
  14.  
  15. Note the /ex must be sent as a separate line, hence the carriage return
  16. codes [13] in the example below.
  17.  
  18. System variables may be added to date the file etc, they must be put in {}
  19. brackets as shown in the example.
  20.  
  21. More than one APPEND: command can be used, the text strings will all be
  22. "added" to form one string. This gets around the limitation that the
  23. script command lines must be less than 100 characters long.
  24.  
  25. The total length of the appended string must not be more than 255 characters
  26. after system variables have been expanded.
  27.  
  28. Examples:
  29.  
  30. APPEND:73 de Alan (G7ALN @ GB7IMB)[13]
  31. APPEND:    *** Sent  on {sys$date} {sys$year} at {sys$time} ***[13]/ex[13]
  32.  
  33. Related commands: UPLOAD:
  34.  
  35.  
  36. ---------------------------------------------------------------------------- 
  37. BREAK:<comment>
  38. ----------------------------------------------------------------------------
  39.  
  40. Purpose: Sends a 50 millisecond "break" to the TNC.
  41.  
  42. Use: Use this command to force the TNC out of transparent mode.
  43.  
  44. Examples: BREAK:
  45.  
  46. Related commands: None
  47.  
  48.  
  49. ----------------------------------------------------------------------------
  50. CHAIN:<filepath>     
  51. ----------------------------------------------------------------------------
  52.  
  53. Purpose: Runs another script
  54.  
  55. Use: The filepath must specify a script to be run. The current script will
  56. stop and the newly specified script will be run.
  57.  
  58. Example:    CHAIN:{ComMail$Dir}.Scripts.MyScript
  59.  
  60. Related commands: None
  61.  
  62.          
  63. ----------------------------------------------------------------------------
  64. DAYTIME:<text>
  65. ----------------------------------------------------------------------------
  66.  
  67. Purpose: Sets the TNC clock.
  68.  
  69. Use: The <text> must be either 10 or 12. The number sets the length of
  70. the time command string to be sent to the TNC. If it is 10 then the string
  71. sent will be of the form:-
  72.  
  73. DA yymmddhhmm
  74.  
  75. Where yy=year, mm=month, dd=day, hh=hour and mm=minutes
  76.  
  77. If the number is 12 then the string sent to the TNC will also include
  78. seconds:-
  79.  
  80. DA yymmddhhmmss
  81.  
  82. Use the number that is appropriate to you TNC. Of course the TNC must be
  83. in command mode to accept the time, so position the command appropriately!
  84.  
  85. Example:  DAYTIME:10
  86.  
  87. Related commands: None
  88.  
  89.  
  90. ----------------------------------------------------------------------------
  91. DELAY:<delay>
  92. ----------------------------------------------------------------------------
  93.  
  94. Purpose: Sets the time-out delay in seconds.
  95.  
  96. Use: Commands TYPE:, WAITFOR:, READ:, UPLOAD: and SCANLIST: will cause a
  97. time-out to be generated if certain actions have not happened within a
  98. period of <delay> seconds.
  99.  
  100. In the case of the TYPE command, all characters in the specified string must
  101. be output within <delay> seconds, the "timer" is started when the command
  102. execution has begun.
  103.  
  104. The WAITFOR: command when executing, similarly starts a timer, after <delay>
  105. seconds a time-out will occur if the specified string has not been read in.
  106.  
  107. The SCANLIST: and READ: commands start and stop the timer several times, the
  108. worst situation that must be allowed for, is during the reading of a
  109. message, where the whole message must have been read in, saved and a new
  110. "prompt" received. (The prompt is setup using the command MYPROMPT:)
  111.  
  112. UPLOAD: sets the timer going when it is trying to send files, the timer
  113. starts when the file is opened and stops when the last character in the file
  114. has been sent. The timer is then reset and ComLink waits again for the
  115. prompt.
  116.  
  117. A time-out will cause the program to stop if no ONERROR: command is used,
  118. otherwise execution of the script will continue with the instruction after
  119. the ONERROR: command.
  120.  
  121. Only one ONERROR: jump can be performed, jumps will only be performed in a
  122. forwards direction. ie a jump back to any previous line will not be allowed
  123. and the script program will end.
  124.  
  125. The delay command can be used many times within a script, indeed, it is
  126. sensible to do so. If you are talking only to your TNC, then a long delay is
  127. not required, since the response will be fast.
  128.  
  129. Typically set DELAY: to:-
  130.  20 when communicating just with the TNC.
  131.  200 when linked to a BBS but not reading messages.
  132.  900 when linked to a BBS and reading messages.
  133. (Yes, it did take nearly 15 minutes one day to read a message!)
  134.  
  135. Example: DELAY:600
  136.  
  137. Related commands: TYPE: READ: WAITFOR: ONERROR: SCANLIST:
  138.  
  139.  
  140. ----------------------------------------------------------------------------
  141. DIRDOWN:<text>
  142. ----------------------------------------------------------------------------
  143.  
  144. Purpose: Sets the download directory for received text files.
  145.  
  146. Use: The command allows the download directory to be specified. If a script
  147. is run and the commands SCANLIST: or READ: used, then any text received will
  148. be saved in the specified directory. If the command is not used in the
  149. script then the default directory used will be Download within the ComLink
  150. application.
  151.  
  152. The directory specified must exist. System variables may be used in <> or {}
  153. brackets.
  154.  
  155. If this command is not used in a script, downloaded files will be placed in
  156. the default directory "Download" in the !ComLink application.
  157.  
  158. The command may be used more then once if files are to be saved in several
  159. directories, in this case, use it before each SCANLIST: or READ: command.
  160.  
  161. See the section on ComMail near the end of the "2_Scripts" manual.
  162.  
  163. Example:  SAVELIST:
  164.           DIRDOWN:RAM:$.Lists
  165.           SCANLIST:ARCHIM:G7ALN
  166.           DIRDOWN:adfs::BBS_files.$.ReadFiles
  167.           READ:
  168.  
  169. Related commands: SCANLIST: READ: DIRUP: SAVELIST:
  170.  
  171.       
  172. ----------------------------------------------------------------------------
  173. DIRUP:<text>
  174. ----------------------------------------------------------------------------
  175.  
  176. Purpose: Sets the upload directory for text files.
  177.  
  178. Use: The command allows the upload directory to be specified. If a script is
  179. run and the command UPLOAD: used, then any files in the specified directory
  180. will be sent to the serial port. If the command is not used in the script
  181. then the default directory used will be For_Upload within the ComLink
  182. application.
  183.  
  184. The directory specified must exist. System variables may be used in <> or {}
  185. brackets.
  186.  
  187. If this command is not used in a script, uploaded files will be taken from
  188. the default directory "For_Upload" in the !ComLink application.
  189.  
  190. The command may be used more then once if files from several directories
  191. are to be sent, in this case, use it before each UPLOAD: command.
  192.  
  193. See the section on ComMail near the end of this manual.
  194.  
  195. Example: DIRUP:RAM:$.ToSend
  196.  
  197. Related commands: UPLOAD:
  198.  
  199.  
  200. ----------------------------------------------------------------------------
  201. FILESCAN:<text>
  202. ----------------------------------------------------------------------------
  203.  
  204. Purpose: Scans a specified file for marked message numbers, subsequently these
  205. may be read/killed using the READ:/KILL: commands. Also sets a system
  206. variable "OldList$Num".
  207.  
  208. Use: Allows an old  "List" file to be scanned for numbers to be read or
  209. killed. The command causes the file to be examined, if a "+" is present
  210. after a message number, then the number before it (up to 6 digits) is
  211. assumed to be a message number. That message number will be read later if
  212. the READ: command is used, the messages that are marked will be saved in the
  213. download directory in a file called "-General-". If the character after the
  214. message number is made a "-" then that message will be "killed" if the KILL:
  215. command is subsequently used.
  216.  
  217. The command also sets a system variable "OldList$Num" which can be used
  218. in the TYPE: command. The number taken is the largest one seen in the file.
  219. This is particularly useful for BBSs that need you to specify the last
  220. listed message. Use:-
  221.  
  222. TYPE:L {OldList$Num}
  223.  
  224. The command may be used on its own before READ:/KILL: commands, or before a
  225. SCANLIST: command. If used before a SCANLIST:, both sets of messages will be
  226. read, ie those marked in the FILESCAN: command and those meeting the
  227. criteria specified in the SCANLIST:. Only messages which have been marked
  228. with a "-" will be killed when KILL: is invoked.
  229.  
  230. The <text> in the SCANLIST command should be a valid filepath.
  231.  
  232. An efficient way to use the command is to point to a previously downloaded
  233. list from a BBS/PMS, in which you have marked the messages to be read. The
  234. message list can be marked using !Edit, simply put a + after the message
  235. number. Eg. in the following example list, message 23456 is marked:-
  236.  
  237. MsgNo  TS Size  To      At      From   Date   Subject
  238. 23456+  B$ 443   ARCHIM   GB7BNM  G6DEN  17-Mar ComLink
  239. 46813  BN 926   SATTV   GBR     G8XZD  17-Mar Sendz LNB\Mod for Telecom Band
  240. 46802-  B$ 807   ALL     GBR     G7ALN  17-Mar What is VT220 please.
  241.  
  242. Any text after the + or - character in a line will be ignored, so you don't
  243. need to remove anything from a BBS list. Of course you can always create a
  244. list of messages to be read yourself. Eg. the file could contain:-
  245.  
  246. 1245+
  247. 23+ 
  248.   34- 
  249.  
  250. Note that spaces are ignored.
  251.  
  252. Remember that ComLink can save a message list with filename "List" in the
  253. download directory. so you can mark the messages you want to be read the
  254. next time the relevant ComLink script is run.
  255.  
  256. Once ComLink has performed a FILESCAN: on the specified file, the file is
  257. re-named with a + at the beginning, this ensures that if ComLink is run again,
  258. the same messages will not be read!
  259.  
  260.  
  261. Example: FILESCAN:adfs::Disc_1.$.!ComLink.Download.List
  262.  
  263. System variables may be used as part of the file path and may be enclosed
  264. in <> or {} brackets.
  265.  
  266. eg FILESCAN:<ComLink$Dir>.Download.List
  267.  
  268.  
  269. ----------------------------------------------------------------------------
  270. FINISH:<comment>
  271. ----------------------------------------------------------------------------
  272.  
  273. Purpose: Stops a script.
  274.  
  275. Use: Can be used at any point in the script, need not be used at the end.
  276. Normally only required before the ONERROR: command (if used), to prevent the
  277. commands after the ONERROR: line from being executed. The text <comment> is
  278. ignored by ComLink.
  279.  
  280. Examples: FINISH:****This is where the script ends!****
  281.  
  282. Related commands: None
  283.  
  284.  
  285. ----------------------------------------------------------------------------
  286. FLUSH:<text>
  287. ----------------------------------------------------------------------------
  288.  
  289. Purpose: Allows the serial input buffer to be flushed.
  290.  
  291. Use: This command is handy if you are not interested in what is coming from
  292. your TNC. When ON the command causes the input buffer to be repeatedly
  293. flushed during the execution of the script, this ensures the input buffer
  294. in the Archimedes does not become full and stop the TNC operating.
  295.  
  296. In general this command is only useful when ComLink is conversing directly
  297. with the TNC, ie when no connection has been made. The command has a built
  298. in side effect, a delay is introduced before each line of text is sent to
  299. the TNC. I found that this was necessary as it is possible to "overload"
  300. my TNC with commands, and it just "freezes" on me.
  301.  
  302. A typical use would be when you are setting lots of TNC options and don't
  303. want to wait for the "cmd:" prompt after every one.
  304.  
  305. The text must be "ON" or "OFF". You must be careful with this command and
  306. remember to switch it OFF before the script needs input again.
  307.  
  308. Example:
  309.  
  310. FLUSH:ON
  311. TYPE:CONMODE CONV
  312.       ....
  313.       ....
  314. TYPE:ECHO OFF
  315. FLUSH:OFF
  316.  
  317. Related commands: None
  318.  
  319.  
  320. ----------------------------------------------------------------------------
  321. ICON:<colour>
  322. ----------------------------------------------------------------------------
  323.  
  324. Purpose: Changes the background colour of the ComLink icon on the bar.
  325.  
  326. Use: Lets the user know when a certain part of the script has been reached.
  327. Valid colours are :-  BLUE,YELLOW,GREEN,RED,WHITE,CREAM,AMBER
  328.  
  329. The colours must be specified in upper case, an unrecognised or unspecified
  330. colour will set the icon colour to grey. The colour can be abbreviated to 3
  331. letters.
  332.  
  333. Examples:  ICON:AMBER
  334.            ICON:YEL
  335.  
  336. Related commands: None
  337.  
  338.  
  339. ----------------------------------------------------------------------------
  340. IGNORE:<text>|<num>
  341. ----------------------------------------------------------------------------
  342.  
  343. Purpose: Makes SCANLIST: ignore lines containing <text> at position <num>.
  344.  
  345. Use: This comand can be used so that a SCANLIST: will ignore lines that have
  346. the specified text at a certain character position in a line.
  347.  
  348. Typically this would be used to prevent your own uploaded messages being
  349. read back during the READ: command.
  350.  
  351. Assume the following snippet of a script is executed:-
  352.  
  353. ...
  354. IGNORE:G7ALN|31
  355. TYPE:L
  356. SCANLIST:G7ALN:ARCHIM
  357. READ:
  358. ...
  359.  
  360. If the list returned by the BBS is say:-
  361.  
  362. MsgNo  TS Size  To     At     From   Date   Subject
  363. 60008  B$ 1221  G7ALN  GBR    G4NZK  07-Mar New !ComLink is brill!
  364. 60007  B$ 1245  ARCHIM GBR    G7ALN  07-Mar !ComLink 4.51 out now!
  365. 60006  B$ 1245  ALL    GBR    G1IVG  07-Mar G7ALN
  366.                               
  367.          1         2         3
  368. 1234567890123456789012345678901234567890  <-- character positions
  369.  
  370. There is a G7ALN starting at character position 31 in message 60007 so
  371. it will not be read by the READ command, despite the fact that the message
  372. otherwise meets the ARCHIM and G7ALN search strings in the SCANLIST command.
  373.  
  374. Examples:  IGNORE:ALL|17
  375.            IGNORE:EU|24
  376.  
  377. Related commands: SCANLIST:
  378.  
  379.  
  380. ----------------------------------------------------------------------------
  381. KILL:<text>
  382. ----------------------------------------------------------------------------
  383.  
  384. Purpose: Kills messages.
  385.  
  386. Use: Messages in a list can be marked with a "-" and a FILESCAN: performed.
  387. If a KILL: command is used later, then the marked messages will be deleted.
  388. The <text> must be the BBS or PMS kill command, for a PMS it is usually
  389. "Kill" but for a BBS "K".
  390.  
  391. Note: On a BBS it is best to kill "read" messages to you, using the "KM" BBS
  392.       command. eg.
  393.  
  394.       TYPE:KM
  395.       WAITFOR:Alan >[13]
  396.  
  397. *** IMPORTANT *** If both FILESCAN: and SCANLIST: commands are used in a
  398. script, the FILESCAN: must come first.
  399.  
  400.  
  401. Examples:  KILL:Kill
  402.            KILL:K
  403.  
  404. Related commands: FILESCAN:
  405.  
  406.  
  407. ----------------------------------------------------------------------------
  408. LOOPIF:<text1>     
  409. ----------------------------------------------------------------------------
  410.  
  411. See command TRYAFTER:<number>
  412.     
  413. ----------------------------------------------------------------------------
  414. MONITOR:<text>
  415. ----------------------------------------------------------------------------
  416.  
  417. Purpose: Allows incoming text to be displayed in the bottom of the status
  418. window.
  419.  
  420. Use: The <text> can be ON or OFF. When ON, the status window will be updated
  421. whenever new text arrives at the serial port. When OFF, the incoming text
  422. is not displayed or updated. The command can be used at any point in the
  423. program, typically during script program testing it would be used at the
  424. beginning of the script. The ON/OFF text must be in upper case.
  425.  
  426. The status window is not popped up automatically by this command, but may
  427. be either manually popped up using the ComLink menu, or, may be popped up
  428. using the REPORT: command.
  429.  
  430. Example: MONITOR:ON
  431.  
  432. Related commands: REPORT:
  433.  
  434.  
  435. ----------------------------------------------------------------------------
  436. MORE:<query>|<response>
  437. ----------------------------------------------------------------------------
  438.  
  439. Purpose: To automatically send a response to the BBS during a SCANLIST:
  440.  
  441. Use: This command must precede a SCANLIST: command, it specifies the text
  442. that if seen, should result in a repsonse being sent to the BBS. eg the
  443. prompt may be:-
  444.  
  445. More Alan Y/N?>
  446.  
  447. So the BBS would expect a "Y" response to continue the list.
  448.  
  449. This facility is only active during a SCANLIST: and allows list commands
  450. available from some BBSs which result in 'More....' prompts. eg LD 123, to
  451. list down to message number 123. When the text in the MORE command is seen
  452. in the list a response will automatically be sent to the BBS.
  453.  
  454. The use of an LD type BBS command is useful if normal scan of a list has
  455. failed, due to a link failure and the BBS has reset the "last listed
  456. number".
  457.  
  458. Both the query string that would be recieved from the BBS and the response
  459. sent back to the BBS can be defined, a | character is used to separate
  460. these. A carraige return is automatically added to the end of the response
  461. string by ComLink.
  462.  
  463. Examples:
  464.  
  465. To send a "Y" response followed by a carraige return use:
  466.  
  467. MORE:More Alan Y/N?>|Y
  468.  
  469. To send just a carriage return use:
  470.  
  471. MORE:More Alan Y/N?>|
  472.  
  473. Related commands: SCANLIST:
  474.  
  475.  
  476. ----------------------------------------------------------------------------
  477. MYPROMPT:<string>|<length>
  478. ----------------------------------------------------------------------------
  479.  
  480. Purpose: Tells ComLink what character sequence to look for to recognise a
  481. command prompt from the PMS/BBS and optionally the length.
  482.  
  483. Use: Normally used near the beginning of a program. When a READ: command is
  484. used, ComLink requests messages one at a time. ComLink needs to know how to
  485. recognise the end of a message so this command tells it what to look for.
  486. The complete prompt does not need to be specified, just the last few
  487. characters, in practice just > could be specified, but this character could
  488. occur in a message, so it is best to specify as many characters as you can.
  489. Most BBSs send the time as part of the prompt.... don't try to include this
  490. as it changes, to cater for this wild card characters # are allowed.
  491.  
  492. Control codes can be incorporated but [13] (carraige return) can ONLY be
  493. used at the end of the line.
  494.  
  495. If your prompt is short, then the chance of it occurring in read messages
  496. is significant. To reduce the probability of it being seen in a message
  497. you can specify the total length of your prompt from the start of the
  498. prompt line to the end, INCLUDING the carraige return (if a part of your 
  499. prompt!). The length can be added after your prompt string preceded by the
  500.  | character (ASCII 124).
  501. eg if your prompt is just:-
  502.  
  503. >[13]
  504.  
  505. where [13] represents "Carraige return":-
  506.  
  507. then use:-  MYPROMPT:>[13]|2
  508.  
  509. Note that the characters specified do not have to be the whole prompt,
  510. just the last bit, but the length must be that of the whole prompt.
  511. eg. for:-
  512.  
  513. GB7SUT - >[13]
  514.  
  515. you can use MYPROMPT:- >[13]|11
  516.  
  517. With a PMS a carraige return is NOT added to the end of the prompt so the
  518. command would be:-
  519.  
  520. MYPROMPT:cmd:|4
  521.  
  522. Examples: MYPROMPT:Alan >
  523.           MYPROMPT:##:## Alan >[13]
  524.           MYPROMPT:>[13]|2
  525.  
  526. Related commands: READ:
  527.  
  528.  
  529. ----------------------------------------------------------------------------
  530. ONERROR:<comment>
  531. ----------------------------------------------------------------------------
  532.  
  533. Purpose: Allows a single jump to be made in the script.
  534.  
  535. Use: If a time-out occurs in the program when it is waiting for a certain
  536. character sequence or cannot output any more characters, then when the time
  537. previously specified in the DELAY: command has elapsed, a time-out will
  538. occur. If no ONERROR: command has been used and a time-out occurs then the
  539. script will finish. If an ONERROR: command has been used, execution of the
  540. next command after the ONERROR will occur, ie a jump will be made.
  541.  
  542. Use of this command can allow a script to exit cleanly, if for instance the
  543. link to the BBS fails, the ONERROR: command can then be followed by script to
  544. disconnect and put the TNC in a defined state.
  545.  
  546. The commands than can cause a time-out error are:-
  547.  
  548.   TYPE: if the serial buffer remains full and does not empty.
  549.   UPLOAD: if the serial buffer remains full and does not empty.
  550.   WAITFOR: if the specified string is not received.
  551.   SCANLIST: if any line takes longer than the delay set.
  552.   READ: if it takes longer than <delay> seconds to read a whole message.
  553.  
  554. Only one ONERROR: command can be used in each script. If more than one is
  555. present, only the last one will be recognised.
  556.  
  557. If there is not a FINISH: command before the ONERROR: command then execution
  558. of the script with no time-out occurring will continue on past it as though it
  559. were not there.
  560.  
  561. Examples: ONERROR: The script will jump to here if a time-out occurs
  562.  
  563. Related commands: TYPE: WAITFOR: SCANLIST: READ: (if a time-out occurs)
  564.  
  565.      
  566. ----------------------------------------------------------------------------
  567. OSCLI:<text>
  568. ----------------------------------------------------------------------------
  569.  
  570. Purpose: Executes a * command.
  571.  
  572. Use: Allows command line commands to be executed within the script. In one
  573. of the example script programs the command is used to open directory
  574. windows. System variables such as ComLink$Dir may be used BUT MUST be
  575. enclosed in curly brackets, eg {ComLink$Dir}. ComLink will then substitute
  576. the appropriate string before passing to the CLI. I found this was necessary
  577. since some CLI commands don't like system variables in the normal <>
  578. brackets.
  579.  
  580. Example: OSCLI:Filer_OpenDir {ComLink$Dir}.Download
  581.          OSCLI:sound 1 340 200 6
  582.  
  583. Nb. {} BRACKETS MUST BE USED AROUND SYSTEM VARIABLES.
  584.  
  585. Related commands: None
  586.  
  587.       
  588. ----------------------------------------------------------------------------
  589. READ:<text>
  590. ----------------------------------------------------------------------------
  591.  
  592. Purpose: If any of the strings were found during a SCANLIST: then those
  593. messages will subsequently be read if the READ: command is used. The text is
  594. optional but if used it defines the character sequence that marks the start
  595. of the message.
  596.  
  597. Use: Used at some point in the script program after a SCANLIST: command.
  598.  
  599. Read messages are saved in directory "Download" within the !ComLink
  600. application directory or within !ComMail. They are saved as text type files
  601. in a directory with the same name as the <string> that was found during the
  602. previous SCANLIST: and/or FILESCAN: command. The saved file will be given a
  603. filename which is the reverse of that days date. (This ensures an alpha-
  604. numeric sort, as in a directory display, lists the files in chronological
  605. order). Subsequent connections to the BBS on the SAME day, will result in
  606. new messages being appended to the end of that days file, a new file is
  607. created every day ComLink is used and mail etc can be sorted at your leisure
  608. without being overwritten.
  609.  
  610. On some BBSs, the message can start with a character sequence that looks
  611. like a prompt! To get around this you can put <text> after the read command
  612. which will identify a message start. eg
  613.  
  614. READ:>[13]
  615.  
  616. The READ: command ends when a prompt has been seen and no more messages are
  617. to be read.
  618.  
  619. ****IMPORTANT**** The READ: command MUST be preceded by the command
  620. FILESCAN: and/or SCANLIST: to determine which messages are to be read.
  621. The last delay command before the READ: command, must allow sufficient time
  622. for a complete message to be read, set DELAY: to at least 600seconds
  623. (10 minutes) if communicating with a BBS.
  624.  
  625. DO NOT include spaces in the <text> parameters.
  626.  
  627. Examples:   TYPE:L
  628.             SCANLIST:ARCHIM:AMSAT:G7ALN
  629.             READ:
  630.  
  631. Related commands: FILESCAN: SCANLIST: MYPROMPT: TYPE: DELAY:
  632.  
  633.  
  634. ----------------------------------------------------------------------------
  635. REPORT:<ON/OFF>
  636. ----------------------------------------------------------------------------
  637.  
  638. Purpose: Pops up a status window.
  639.  
  640. Use: Useful to force the status window to appear. A status window can be
  641. popped up at any time by using the menu option.
  642.  
  643. Examples: REPORT:
  644.  
  645. Related commands: None
  646.  
  647.  
  648. ----------------------------------------------------------------------------
  649. SAVELIST:<filename>
  650. ----------------------------------------------------------------------------
  651.  
  652. Purpose: Forces the program to save the next message list to a file.
  653.  
  654. Use: Normally placed at the start of the script program but only has an
  655. effect if a SCANLIST command is used. The saved list is put in the ComLink
  656. application's download directory in !ComMail and called "List" or
  657. <Filename>. If <filename> is blank or contains a space the filename will be
  658. set to "List".
  659.  
  660. A separate SAVELIST: must be inserted before every instance of SCANLIST: if
  661. the list from every SCANLIST: is to be saved.
  662.  
  663. Examples:
  664.  
  665. SAVELIST:BBS_List
  666.  
  667. Related commands: SCANLIST:
  668.  
  669.  
  670. ----------------------------------------------------------------------------
  671. SCANLIST:<string1>:<string2>.....
  672. ----------------------------------------------------------------------------
  673.  
  674. Purpose: Examines a message list from the BBS or PMS, and looks for
  675. <string1>,<string2> etc. in each line. If any of the strings are found then
  676. that message will subsequently be read if the READ: command is used.
  677.  
  678. Use: Use this command after initiating a "List" from the TNC or BBS by using
  679. the command TYPE:L (or equivalent), where sending "L" causes the BBS to list
  680. the messages.
  681.  
  682. The <string> is case sensitive, ie if ARCHI is the string, then a match will
  683. be found in MARCHING, but not for Archimedes. Up to 10 <string>s may be
  684. specified, each must not be longer than 10 characters.
  685.  
  686. Listed messages seem to have a standard format, this has been assumed by the
  687. ComLink program. The message list must be in the form:-
  688.  
  689. NNNNNN.......................
  690.  
  691. Where .... indicates any text up to 100 charecters long, and NNNNNN is a
  692. message number which may contain spaces.
  693.  
  694. A preceding SAVELIST: command will force ComLink to save the list in a
  695. default or specified directory, with filename "List".
  696.  
  697. The last delay command before the SCANLIST: command, must allow sufficient
  698. time for each listed line to be read, set DELAY: to at least 120 seconds.
  699.  
  700. The SCANLIST: command finishes having seen your prompt, as defined in the
  701. MYPROMPT: command so a WAITFOR: command MUST NOT be used after the SCANLIST:
  702. command. See example 3 below.
  703.  
  704. Example: (for a PMS/BBS):  TYPE:L
  705.                            SCANLIST:G7ALN:ARCHI:SAT
  706.                            READ:
  707.  
  708. Related commands: SAVELIST: READ: TYPE: DELAY:
  709.  
  710.       
  711. ----------------------------------------------------------------------------
  712. START:<time>
  713. ----------------------------------------------------------------------------
  714.  
  715. Purpose: Waits until a given time before continuing with the script.
  716.  
  717. Use: Normally placed at the beginning of the program. The time specified
  718. must be in 24hr format.
  719.  
  720. Another terminal program must not be running when a script starts, otherwise
  721. characters may be stolen from the serial port and the operation of ComLink
  722. will be upset.
  723.  
  724. A colon must be used to separate the hours and minutes.
  725.  
  726. Examples:  START:23:00
  727.  
  728. Related commands: None
  729.  
  730.  
  731. ----------------------------------------------------------------------------
  732. TRYAFTER:<number> LOOPIF:<text> and UNTIL:<text>
  733. ----------------------------------------------------------------------------
  734.  
  735. Purpose: Allows loops conditional on the text received.
  736.  
  737. Use: Typically used to check if the BBS is busy and try again later if it
  738. is. These commands setup a conditional loop.
  739.  
  740. The LOOPIF: command specifies the text which will cause a loop back from the
  741. UNTIL: command. A pause equal to the TRYAFTER: value will be made on each
  742. loop back. The text specified in the UNTIL: command, when seen will allow
  743. the script to continue with the following command. No delay is made on the
  744. first pass through the loop, only when a loop-back is made.
  745.  
  746. Choose the text by looking at the BBS output when it is busy. GB7IMB sends
  747.  
  748. *** IMBBBS busy
  749.  
  750. so I can specify all or part of this in the LOOPIF: command. When a
  751. successful connection is made I get back the prompt, so I can use
  752. Alan > as the text in the UNTIL: command. (Wildcards are NOT allowed!)
  753.  
  754. In the example below the TRYAFTER: command defines a 360 second (6 minute)
  755. pause on loop back. A connection to the BBS will be attempted and the
  756. text "Alan >" OR "busy" waited for. If "Alan >" is received the script will
  757. continue with TYPE:L but if "busy" is seen then the next script command
  758. executed will be LOOPIF: again and a pause of 6 minutes made.
  759.  
  760. The last used DELAY: command sets the time-out limit to see one of the text
  761. strings (in the example "busy" or "Alan >") while the UNTIL: command is
  762. executing.
  763.  
  764. There is no limit to the number of loop backs! More than one loop can
  765. be setup in the script but you can't have nested loops.
  766.  
  767. Examples: TRYAFTER:360
  768.           LOOPIF:busy
  769.           TYPE:C IMBBBS
  770.           UNTIL:Alan >
  771.           TYPE:L
  772.  
  773. Related commands: DELAY:
  774.  
  775.        
  776. ----------------------------------------------------------------------------
  777. TYPE:<string>[control code]
  778. ----------------------------------------------------------------------------
  779.  
  780. Purpose: Sends the text in the string to the serial port.
  781.  
  782. Use: Sends the string just as though it were typed into a terminal program.
  783.  
  784. Control codes may be sent by specifying the decimal number of the code in
  785. square brackets.
  786.  
  787. A carraige return code will automatically be added to the end of the line by
  788. !ComLink.
  789.  
  790. System variables can be used in {} brackets. This feature is useful when
  791. a BBS requires the last listed message number in the list command since
  792. a FILESCAN: will extract this for you from an old saved "List" file and
  793. save it as {OldList$Num}. See the FILESCAN: command for further details.
  794.  
  795. ComLink will try to send the whole string within a time period set by delay.
  796. A time-out will be generated if the string cannot be sent (due to the output
  797. buffer on the serial port failing to empty). See the DELAY: command.
  798.  
  799. Examples:  TYPE:C GB7IMB
  800.            TYPE:CONM TRANS[13]MON OFF
  801.  
  802. (Note [13] is the code for a carriage return)
  803.  
  804. Related commands: DELAY:
  805.  
  806.  
  807. ----------------------------------------------------------------------------
  808. UNTIL:<text2>      
  809. ----------------------------------------------------------------------------
  810.  
  811. See command TRYAFTER:
  812.  
  813. ----------------------------------------------------------------------------
  814. UPLOAD:<comment>
  815. ----------------------------------------------------------------------------
  816.  
  817. Purpose: Sends up to 10 files in the upload directory to the serial port.
  818.  
  819. Use: Normally this command would be used as soon as a link to the BBS has
  820. been made. All files in the upload directory within will be sent to the
  821. serial port providing the filename does not start with a +. No characters
  822. are added to or removed from the files, but all line feeds are converted to
  823. carraige returns.
  824.  
  825. You can specify the upload directory in your script using DIRUP: but if you
  826. don't use this command ComLink will look in the For_Upload directory within
  827. the !ComLink application directory.
  828.  
  829. The command ends having seen your prompt, the PMS/BBS is therefore ready to
  830. receive the next command.
  831.  
  832. When each file has been sent and the prompt received, the uploaded file will
  833. be re-named with a "+" added to the beginning of the filename. Filenames
  834. starting with a "+" will not be sent, this prevents files being sent twice
  835. accidentally.
  836.  
  837. The files must be put in the directory by yourself. Text files must contain
  838. all information for the BBS to save/send on the message. The message can be
  839. created with !Edit and typically would contain:-
  840.  
  841. SP G7ALN @ GB7IMB
  842. Re. ComLink...
  843. Hi Alan, your !ComLink program is ......
  844. ........
  845.  
  846. 73 de Me
  847. /ex 
  848.  
  849. IMPORTANT: WHEN CREATING THE TEXT FILE, "RETURN" MUST HAVE BEEN PRESSED
  850. AFTER THE /ex. You can check this has been done, by using the mouse/caret in
  851. !Edit. You should be able to put the caret on the line below the /ex.
  852.  
  853. If the APPEND: command is used at the start of the script, then that can
  854. contain the /ex to end the message and it therefore need not be put in
  855. the text file for upload.
  856.  
  857. Only one message per file should be used, since only when the whole file has
  858. been sent does ComLink start looking for your prompt (as set by the
  859. MYPROMPT: command)
  860.  
  861. Example:  UPLOAD: Any old text here, program ignores it!
  862.  
  863. Related commands: MYPROMPT: DELAY: APPEND:
  864.  
  865.  
  866. ----------------------------------------------------------------------------
  867. WAITFOR:<text>
  868. ----------------------------------------------------------------------------
  869.  
  870. Purpose: Waits for a period (set by the DELAY: command) for the text
  871. <string> to be seen.
  872.  
  873. Use: Pauses the script to wait for the <text>. The "case" of the text must
  874. be correct. The command reads in all characters until the <string> is found.
  875.  
  876. Examples:  WAITFOR:Alan >
  877.  
  878. Related commands: DELAY:
  879.  
  880.  
  881. ----------------------------------------------------------------------------
  882. WKEY:nX:<label>:<text>
  883. ----------------------------------------------------------------------------
  884.  
  885. Purpose: Programs WimpKey "n"
  886.  
  887. Use: Wimpkeys are sort of "on screen" function keys. There are two sets of
  888. keys in the window which have different functions these consist of 8 yellow
  889. wimpkeys and 8 white ones, there are also some control icons.
  890.  
  891. Wimpkeys provide a significant enhancement to the operation of !ComLink, in
  892. particular, they make operation on "HF" a doddle!
  893.  
  894. The terminal instructions in file "TermInstr" provides a full description of
  895. WimpKey operation. The 'WimpKey Edit' facility in the ComLink menu provides
  896. the simplest method of changing the wimpkeys, the following description is
  897. provided for the hardened script writer!
  898.  
  899. Use values of "n" is in the range 1 to 8 for the yellow wimpkeys and 11 to
  900. 18 for the white ones. (Keys are numbered from left to right).
  901.  
  902. X is the key 'type', valid types are N.F,S,T, where the meaning of the
  903. letter is:-
  904.  
  905. N - None, ie the <label> and <text> are ignored
  906. F - File, <text> specifies a file to be uploaded
  907. S - Script, <text> specifies a script to be run
  908. T - Text, <text> specifies the text to be sent to the TNC
  909.  
  910. The <label> of any key can be up to 9 characters.
  911.  
  912. The <text> can be up to 128 characters. The <text> is optional and can be
  913. ommitted if the <label> and <text> would be the same.
  914.  
  915. Only the currently visible wimpkey set can be altered using this command.
  916.  
  917. Examples:
  918.  
  919. The following line programs the label of wimpkey 1 to be "BBS", when the
  920. wimpkey is clicked a script called "Read_BBS" will be run, this will be in
  921. the WimpKeys directroy within the !ComLink application.
  922.  
  923. WKEY:1S:BBS:Read_BBS
  924.  
  925. The following line programs key 2 to send file "My_address" to the TNC.
  926.  
  927. WKEY:2F:Address:My_address
  928.  
  929. The following line programs wimpkey 6 to send 'Ctrl C'+'D'+'Return' to the
  930. TNC, hence causing a disconnect.
  931.  
  932. WKEY:6T:Disconn:[3]D[13]
  933.  
  934. Related commands: None
  935.  
  936.  
  937. ============================================================================
  938.  
  939.