home *** CD-ROM | disk | FTP | other *** search
-
- SCRIPT FILES
- ============
-
- 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, some 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.
-
- 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 several ways of changing the file type, use the *command
- (*Settype), use the 'Set type' option in many of the text editors, or use
- the application provided called !Convert. To use !Convert, load it 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:-
-
- APPEND:<text> Adds text to the end of each upload file.
- BREAK:<comment> Sends a "Break" to TNC, gets it out of transparent mode.
- CHAIN:<script> Runs another script.
- DAYTIME:<10/12> Sets TNC clock.
- DELAY:<number> Sets the delay to timeout in seconds.
- DIRDOWN:<path> Sets the "download" directory.
- DIRUP:<path> Sets the "upload" directory.
- FILESCAN:<filepath>Scan a file for marked messages to be read/killed.
- FINISHED:<comment> Stops the script.
- FLUSH:<ON/OFF> Switches on/off input buffer flushing.
- ICON:<colour> Changes the background colour of the ComLink icon.
- KILL:<text> Sends message kill commands to PMS/BBS.
- LOOPIF:<text1> Loop start point. Loop from UNTIL: if <text1> is seen.
- MONITOR:<text> Allows incoming text to be seen in the status window.
- MORE:<text> Generates automatic "Y" to BBS requests for "More Y/N"
- MYPROMPT:<text> Your prompt, optional wildcards and prompt length.
- ONERROR:<comment> Where execution continues after a timeout.
- OSCLI:<text> Executes * commands.
- READ:<text> Reads messages from FILESCAN/SCANLIST, text is optional.
- REPORT:<ON/OFF> Pops up or closes the ComLink status window.
- SAVELIST:<comment> Ensures that ComLink saves the message list.
- SCANLIST:<text1:..:text9> Extracts message numbers when text1 etc is seen.
- START:<time> Continues script execution at the specified time eg 23:30
- TRYAFTER:<number> Sets the retry time in a loop.
- TYPE:<text> Sends the text to the serial port.
- UNTIL:<text2> Continues if <text2> seen, loops back if <text1> is seen.
- UPLOAD:<comment> Sends files to the serial port.
- WAITFOR:<text> Takes characters from serial port until <text> is seen.
- WKEY:n:<text> Programs WimpKey 'n' to text.
-
-
- The following restrictions apply to the use of commands:-
-
- 1) Commands must be in capital letters.
- 2) Commands may be abbreviated 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 maximum, including comments. This should be
- enough for most applications. Lines can only be 100 characters long maximum.
-
- 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.
-
- The commands are all described in detail in the text file "3_Commands".
-
-
-
- !ComMail for setting the upload and download directory paths.
- ------------------------------------------------------------
-
- !ComMail provides an easy way of setting your upload and download paths.
-
- A !ComMail directory has been added which allows the path of upload and
- download to be set easily. Simply put the !ComMail directory where you like
- on floppy, in RAM drive etc. Double click on the !ComMail directory to be
- used for upload and download. A system variable ComMail$Dir will be set to
- point to the selected directory. This can be used in your scripts, eg :-
-
- DIRDOWN:{ComMail$Dir}.From_BBS
- DIRUP:{ComMail$Dir}.To_BBS
- OSCLI:Filer_OpenDir {ComMail$Dir}.From_BBS
-
- You can create your own directories within !ComMail, put them in the
- !ComMail.Mail directory. Double clicking on the !ComMail icon automatically
- opens this directory for you.
-
-
- PROBLEMS?
- =========
-
- I hope you have the time to write a script file or to adapt one I have
- provided in the directory "Script_Ex". The time you save by not having to
- sit at the keyboard to get messages from the BBS is time you can use more
- usefully. (If you are married perhaps your wife will see more of you!)
-
- The programs supplied are not guaranteed to be free of bugs. The usual
- disclaimers apply, don't blame me if use of the programs causes loss of any
- data or any other type of damage!
-
- Do contact me via packet if you have any problems or have any suggestions
- regarding possible improvements. I'll try to help. (G7ALN @ GB7IMB)
-