home *** CD-ROM | disk | FTP | other *** search
-
- Script files
- ------------
- So you've set changed the Config file and saved it. Now what can you do?
- Well errrr.. actually nothing until you either write a script file or change
- one of the ones provided! It'll be worth it in the end though!
-
- What is a script file? Well it's like a program, ComLink looks at each line
- in the script sequentially and does what you tell it. Take a look at the
- file SCRIPT within the !ComLink application. (To do this hold down SHIFT and
- double click on the !Comlink icon). Load !Edit as normal, drag the file
- SCRIPT file to the Edit icon on the bar. Most of the lines start with a
- command word followed by a colon, most are further followed by some text. I
- have tried to make the commands self explanatory as best I can. Further
- information is provided on each command later in this document, but before
- you are overwhelmed with the apparent complexity of the program, look at the
- TYPE: command. All this does is send the text after the command to the
- serial port. Just as though it had been typed at the keyboard. Simple eh?
-
- To handle text sent back from the TNC there is a command WAITFOR:, which
- simply causes characters to be taken from the TNC until exactly the text
- given after the command has been seen.
-
- TYPE: and WAITFOR: are probably the two commands you will use most.
-
- When a script program is running, any terminal programs (other than the one
- incorporated into ComLink) must be disabled or closed down (quit), since
- otherwise they may steal characters from the serial port and affect the
- operation of ComLink.
-
- Creating a script
- -----------------
-
- Scripts can be created using the !Edit wordprocessor, or an old one can be
- loaded into !Edit, saved under another name and modified. Script files have
- their own "type", so normal text files must have their filetype changed
- before ComLink will run them.
-
- There are two ways of changing the file type, use the *command (*Settype) or
- use the application provided called !Convert. To do this load !Convert by
- double clicking it's icon. Drag the text file to the Convert icon on the
- bar, hey presto the file type changes. !Convert will also change script
- files back to text files by the same method.
-
- Script files have been given the filetype 56E (hex.)
-
-
- SCRIPT COMMANDS
- ===============
-
- The following script commands may be used:-
-
- START:<time>
- TYPE:<text>
- WAITFOR:<text>
- DELAY:<number>
- READ:<text>
- UPLOAD:<comment>
- REPORT:<comment>
- MYPROMPT:<wildcarded text>|<length>
- SAVELIST:<comment>
- FINISHED:<comment>
- ONERROR:<comment>
- ICON:<colour>
- SCANLIST:<text1><:text2>....<:text9>
- BREAK:<comment>
- ENDLIST:<text>
- MONITOR:<text>
- DIRUP:<text>
- DIRDOWN:<text>
- FILESCAN:<text>
- OSCLI:<text>
- APPEND:<text>
- KILL:<comment>
- DAYTIME:<number>
- FLUSH:<text>
- LOOPIF:<text>
- UNTIL:<text>
-
- The following restrictions apply to the use of commands:-
-
- 1) Commands must be in capital letters.
- 2) Commands may be abreviated to 4 letters.
- 3) Commands must end with a colon before the <text> etc begins.
- 4) Only one command per line is allowed.
- 5) Commands must start the line.
-
- If these rules are ignored, or if the command is not a valid one the line
- will be treated as a comment (eg like a BASIC REM statement).
-
- Text received by the serial port is assumed to have a line end marker of
- "carriage return" ie a control code of value 13 (decimal). (Nb version 1.00
- assumed lines ended with a line feed)
-
- All outgoing text lines are ended automatically by ComLink with a "carraige
- return" code.
-
- Where no text etc is required by a command (eg UPLOAD:), then a comment may
- be put on the rest of that line, this will be ignored by the program.
-
- Script files can only be 150 lines long, including comments. This should be
- enough for most applications. Lines can only be 100 characters long.
-
- When text files are created by a ComLink script and they are being written
- to, a special file type is allocated to the file (type &56C), this is the
- same as the normal text type icon except the "pen" in the icon is red. The
- icon will be switched back to the normal text icon when the file is closed.
-
-