USING SCRIPT FILES


TABLE OF TOPICS


The Scripting Languages


Telix has an incredibly powerful built-in 'script' or command language, called SALT (Script Application Language for Telix). In the simplest terms, a script file is a sequence of commands for Telix to follow, written using a certain format. Script files can do many useful things like automatically logging on to a host, setting up special parameters, performing unattended file transfers, and many other tasks. A script file can be linked to a dialing directory entry so that it is run automatically when that entry is connected to, and sup- plies the needed logon information.

Like any real programming language, SALT has a large number of features. Because of this, programming in SALT is not easy for the beginner who has no knowledge of any programming concepts. However SALT scripts can be used to different degrees. The advanced user can program complex applications, while even a novice can modify the sample scripts include with Telix, and run scripts supplied by others.

For advanced users, a separate 100+ page manual describes SALT and its syntax. The rest of this section describes how to create, run and compile the various forms of scripts. All forms of scripts must be compiled by one of the two compilers (CS.EXE or CSS.EXE) and all scripts are executed with the ALT-G command.

Table of Topics


SALT


Before a SALT script can be used, it must be 'compiled'. The CS.EXE program included with Telix takes the ASCII 'source' scripts that the user writes, and compiles or converts them to a form that is easier for Telix to process, usually takes less space, and loads more quickly. SALT scripts may actually use any name. However in standard practice the extension 'SLT' is used for SALT source scripts, and the same name with the extension 'SLC' is used for the compiled version.

If you have an already compiled SALT script (ending with the extension 'SLC' (for example, the QDHOST.SLC Host Mode script file), it is very easy to execute. While in terminal mode, press Alt-G. Telix will ask for the name of the script file to run. If you supply no extension, 'SLC' is assumed. If a special directory where script files are to be found has been defined, Telix will look there for script files, unless path is given. To define this script directory use the Telix Configuration Menu. Telix will then load the script file and follow its instructions. To abort a script while it is executing, press the Esc key. Sometimes you may have to press Esc twice, the first time to abort the current function, and the second time to abort the script itself.

You may have used your text editor to modify one of the sample scripts included with Telix (most simply require inserting your name in a clearly marked location near the top). You now need to compile the script file. To do this, the CS.EXE program is used. While at the DOS prompt, type 'CS', followed by a space and the name of the script file you want to compile (the extension 'SLT' is assumed if none is given). CS will scan through the source file and produce the compiled version, using the same base name but the extension 'SLC'. If a syntax error is discovered while compiling the script file, CS will report it and abort. In that case the error should be fixed and CS run again. From within Telix, you may quickly run CS either by using the DOS Command function (Alt-V), or from the DOS Shell (Alt-J). Remember, every time you make a change to the source file, you must re-compile it, otherwise Telix will still run the old compiled ver- sion. This sounds tedious, but in practice once a script is developed it doesn't change very often.

Table of Topics


SIMPLE


For those users not comfortable in a structured programming environment, Telix provides a Salt IMPLEmentation, or SIMPLE scripting language. SIMPLE is a non-structured language that is converted to the more complex SALT for the user prior to actually compiling it. SIMPLE scripts need to be compiled with the CSS.EXE program. While at the DOS prompt, type 'CSS', followed by a space and the name of the SIMPLE script file you want to compile. The extension .SIM is assumed if none is given. CSS will scan through the source file and produce a compiled .SLC file. If a syntax error is discovered while compiling the script, CSS will report it and abort.

Simple requires that the CS.EXE SALT compiler reside in the DOS path. A complete listing of all SIMPLE scripting commands and structures is available in SIMPLE.DOC or in the printed manual.

Table of Topics


Learning a Script


Some operations you will perform in Telix are highly repetitive, such as logging onto an online service. The user name, password, and other information is always entered in the same order, the same way, every time you call. You can use the Script Learn function to create an automatic log-on script to do this for you each call.

To learn a sequence of responses to prompts, toggle the learn mode on from telix Terminal mode by pressing ALT-9. Enter the name of the script to learn when prompted. .SLT is assumed to be the filename extension if one is not given.

Telix will record your responses to the various prompts of the online service until learning mode is turned off with ALT-9 again. When turned off, Telix saves the learned script. Remember, the learned script must be compiled prior to use.

It is important while learning a script to remember to wait for the complete prompt to be displayed before responding. Unpredictable results can be exhibited if a fast typist or a user familiar with a service types ahead of the prompts.

Learned scripts, while useful, are not always completely accurate, and may not work without editing. If the prompt being responded to contains information that can vary (such as the number of minutes left online), then the .SLT file may need to be edited prior to being compiled. An example is the prompt on the Telix support BBS, which usually reads much like the following:

(4 used, 86 left) Main Board Command?

If there are not exactly 86 minutes remaining on your next call, a learned script containing this prompt will not function properly. The line in the learned script:

waitfor("(4 used, 86 left) Main Board Command", 30);

should thus be edited to read:

waitfor("Main Board Command", 30)

for proper operation of the learned script.

Script learning is only available in registered versions of Telix.

Table of Topics


[Table of Contents]
Page layout by S.Spyrou, C.Polichroniadis
HTML Programming by C.Polichroniadis