Chapter 15


What Script Files are

Scripting is a language much like BASIC and scripting is becoming more popular in the new generation of terminal programs. Since it is a language, it can be programmed (or written) by you to do whatever functions are within the confines of the script language commands. In the case of FastTerm II I have implemented over 40 commands. While these are very basic in nature, they are not in function. For example it is possible to write a script file which calls a BBS, reads all the new mail into a text buffer, saves the text buffer to disk, sends a new message to the Sysop, downloads a couple of files, uploads one or two files and finally terminates the connection. Which sounds like something most of us do almost every day. Only in this case you never touched a key. The script file did it all!


How to Write a Script File

Writing a script file is actually very easy. If you have ever done any Basic programming at all, youll find scripting very easy to grasp. To start you need a plain ASCII text editor. I suggest you use something like TED. It is a line based text editor and comes on every LSDOS master system disk. It is not overly hard to learn and is nice for creating those quick and dirty script files. If you have a word processor which are you very familiar with and would prefer to use that, remember that maximum line length is 79 characters and each line MUST be terminated with a carriage return (the [ENTER] key). When you save your script, remember to save it as an ASCII file. To generate the [ key in most word processors or TED use the [CLEAR] and [<] keys.

As with any language you have command words which will invoke certain functions. Unlike BASIC programming each script command takes one line. You can not mix scripting commands on a line. The reason for this is that the scripts are processed line by line and the end of each line is terminated by a carriage return. If you had more than one script command on a line any commands after the first one would be ignored. The second reason you can only have one script command per line is that it makes debugging much easier. Imagine having 20 or 30 commands on a line and trying to find the one that is giving you problems.

Script command words are just plain ordinary English words. FastTerm II needs a way of knowing if you want it treated as a command word. Therefore each script command word is prefaced with the [ symbol. It will be the first character on the line and the script command word will be following it with no spaces. 

Any line which does not have a script command on it will be treated as a SEND line. It will be sent directly to the modem.

The simplest script would be one with just the end statement. Like :

[END

A slightly more complex one would first clear the screen and then end like :

[CLS
[END

As shown in both of the examples scripting is not all that difficult to write. It can become as complex as you want since some of the scripting commands are very powerful. On your disk are many examples of script files so that you can see how they are written.

When writing a script file remember that the script command processor runs within itself. It does not expect any outside help from you on what to do in most cases. If you write the script so that some user interaction is required, so much the better depending on your application. However like all good programs, no one can anticipate it all. Use the [REM statements as much as you can. They are not loaded into FastTerm II during the initial loading of a script file before execution. This also holds true for blank lines in your scripts. I.e. lines which only have a C/R on them.

If you find a script is getting too big to be manageable, split it into small sections and separate them by [REM statements or blank lines. If the script becomes too large to fit into the scripting area for FastTerm II use the [CHAIN command to load the correct module and when it has done executing, return to the menu module. In this way scripts of just about any size or complexity came be easily written.


Script Language Types

Script commands are very versatile in that they can pass or accept arguments with variables. Some command words are able to work with variables and literal strings. Literal strings are considered to be plain english text and are almost always enclosed within quotes so that the script processor knows where the string starts and stops. On the other hand, for a command word to use a variable, it is not important to be within quotes since a variable exists in memory and is referred to directly by using the % and variable number.


Defining Script Variables

With scripts command words are only half the power. The remaining amount comes from the variables supported by the scripting language. In FastTerm II version 1.50 or newer there are 5 variables which may be accessed and used in different ways. In FastTerm II version 3 or newer the length of the variable has been changed to 80 characters from the original 40. Other commands have also been added to manipulate variables. If you are more comfortable you may refer to them as fields since in effect that is what they really are.

There are five variables available. They are labeled V0 thru V4 and each has room for 80 alphanumeric characters. If you are used to programming in BASIC you may think of them as five variables which can store a string of 80 characters each, like A$(0) thru A$(4). To make it shorter and more manageable on a Model 4 I have taken the liberty of using V and a number. In the manual this is displayed as V# (where the # sign can be any number from 0 to 4). Once defined, each variable will remain intact until redefined therefore it can be used many times in the same script (even if you chain to a completely different script).

Using the variables is not really all that hard once you understand the syntax (format) expected by FastTerm II.

Since a variable is only powerful once defined, there are three ways to define one in FastTerm II. You may use which ever one suites your purpose and they are varied enough so that almost any circumstance can be handled. There are three commands which allow you to define a variable.

[GET LINE_V#
[KEYIN_V#
[SET V_#


The _ (underscore) character indicates a mandatory SPACE! Dont try to shorten your script lines by leaving them out. Each of these commands affects a specific operation.

GET LINE will read up to 80 characters from the remote connection. If you are using the keyboard, say while typing in an answer to a prompt, GET LINE will capture up to 80 characters of it. If a return or linefeed character is received while getting the line, the mode will terminate with the line stored up to the point of the control character.

KEYIN is used when you want to define a variable for later use in a script directly from the keyboard. It will prompt you as V#  : but this and your response will not be sent to the modem. The # in this case identifies (0-4) which variable is going to be used. When you press the ENTER key the mode is completed and the script processing will continue. While you are entering this string, you will not be able to receive any characters. Therefore it is important to make sure you not in the midst of receiving a lot of text.

SET is for defining a variable from within the script itself. While you may not find many uses for this command, it may be used on later versions of the script processor with additional script commands.


Retrieving Script Variables

Of course just being able to define a script variable is only half of the task. You still want to take advantage of using the newly defined script. Any time your are retrieving a variable the variable number will always be proceeded by a % (percent) sign.

Only certain commands are affected by the variables and they are :

BUFFSAVE, CHAIN, GET1KX, GETXMD, SND1KX, SNDASC, SNDXMD, WAIT FOR, WAIT TIME,  CHARGE COST H/M , WRITE and others.

A typical usage for a variable would be where you want to call a system at a preset time. Instead of writing the script with the ABSOLUTE time, you would get the time you want from a variable. Such a script would read :

[KEYIN Enter the time you want to proceed as HH:MM:SS (24 hr format) V1
[WAIT TIME %1

At which point in time the script will stop and wait until the time of the Model 4 matches the time you entered. Obviously the time you entered as a variable is not checked for accuracy so it is possible to enter a non-valid time. But since scripting has made it so easy I had to leave something for you to do.
 
Another use may be where you want to use special filenames for sending or receiving files, or saving the capture buffer to disk. These can be utilized the same as in the previous example.


Scripting Window

FastTerm II now allows a six line window for your scripting file use. Effectively you write what you want to be displayed into a window and then display the window using the [WINDSP command. It will overlay the communications screen but when you use the [WINHIDE command it will restore the communications window to normal. In this way you can use your own window menus just like those in FastTerm II .

There are several commands which apply strictly to the new window routines. You can write literal text into a window at any line position (from 1 to 6), or selectively clear any line position. There are a maximum of 58 characters per line you may program. A variable may be used to pass the string to be inserted into the window.

An additional command allows input within the confines of the window so as not to disrupt the communications window display with inputs.

Combining windows within your scripts (use it as a menu) make not only a pleasing display, but make your script that much easier to use since you are working from a menu.


Scripting Literals

FastTerm II allows literal text to be used with certain commands. This means that you can enclose the literal text within quotes. Literals for FastTerm II are not analyzed or interpreted in any way. They are considered to be text and are simply displayed.

Commands literal strings may be used with are WINLINE, SEND, WAIT FOR, KEYIN, WINKEY and WRITE. You should get into the habit of using quotes where ever FastTerm II expects a string of information that way you wont get a syntax error. It was optional for FastTerm II 1.64 on the previous commands but starting with version 4 it should be used where ever required. You may mix literal strings and variables with some commands. I.e. [WRITE "Welcome" %1 "to the best BBS in" %2. Note that almost in all cases literal text is enclosed with quotes. The only exception for this rule is for filenames when using the script file transfer commands. These will not work if you use the quotes due to the way the script processor works.


Script Command List

All script commands must be prefaced by a [ sign when you create the script file. Once created you may call the script file anything you like. Script filenames always are entered in the SCRIPT menu box. Parameters are shown within {} signs after the command. Note also that some commands may use the variables instead of the options parameters shown in {}. Where possible, try to use quotes to surround literal text. This not only makes for easier debugging a script file, it allows you to differentiate between commands and text easily.

[APPEND	If the capture buffer has been used, you may use this command to append text to what is currently in the buffer without having to clear it out first. If the buffer has not be used this will work the same as the CAPTURE ON command.

[BAUD rate,WPS	where rate can be 300, 1200, 2400, or 9600. W = word, P = parity and S = stop bits. There are no spaces between uart parameters (the baud rate and word, parity and stop). A variable may be used to pass the uart information for setting. If you want only to change the uart parameters and not the baud rate use a comma followed by the word, parity and stop bits. I.e. [BAUD ,8N1 is an acceptable format. For variable passing, [BAUD %1 is an acceptable format.

[BEEP	will produce a BEEP from the Model 4 internal sound board.

[BREAK	will send a true break of 350ms to the modem. In some cases this may cause a disconnect.

[BUFFSAVE "filespec/ext:d"	will save anything in the capture buffer to disk providing there is actually something in the capture buffer. If not this command will be ignored. You must specify the filename, extension and drive if you want to save it specially. If no drive is specified it will be saved on the first available drive. [BUFFSAVE %1 is an acceptable format if you want to define the filename as a variable.

[CAPTURE {on/off}	will open or close the capture buffer depending on the ON or OFF word. If no word is present, ON will be assumed. A variable can not be used for the ON or OFF argument.

[CHAIN "filespec/ext:d"	where filespec, extension and drive number MUST be valid. i.e. there is such a file. A variable may be used to pass the filename to the command. I.e. [CHAIN %1 is an acceptable format.

[CHARGE AUTO {on/off}	fwill control the output of the charges on loss of carrier. If no argument is supplied, then ON is assumed.


[CHARGE COST {H/M###}	will set the cost of the call in H for hours or M for minutes to the number entered. Note please do not use periods to specify a decimal value. $1.42 per hour would be entered as H142. if desired a variable can be used to the set the time period and cost. It may not be used to set the time period or cost alone. [CHARGE COST %1 would be acceptable.

[CHARGE {on/off}	will control the display the charges time cost on the video display. If no argument is supplied then ON is assumed.

[CHARGE RESET	will reset the cost charges timer to 00:00:00.

[CHARGE RESUME	will re-enable the charges to add up again. The $ on the screen will stop flashing to indicate charge timing has resumed.

[CHARGE SUSPEND	will suspend cost charges from adding up until RESUME CHARGE is used. The $ on the screen will flash to indicate suspension.

[CHARGE WRITE	if CHARGE is ON, this will write the total charges to the disk and turn off the charge display on the screen. It is generally used where noisy lines prevent the CHARGE AUTO from working properly.

[CLOCK {on/off}	will control the elapsed time as per the command word. If no command is supplied, ON is assumed.

[CLOCK RESET	will reset the elapsed timer to 00:00:00.

[CLS	will clear the screen.

[COPY %# %#	can be used where you want to copy from one variable to another. A space between the variables is not mandatory but should be used for ease of reading. And acceptable format would be [COPY %1 %2 which would copy the information contained in variable 1 to variable 2. It would not destroy the information in variable 2.

[CTRL $	where the $ represents a letter from A-Z to send. Before sending it FastTerm II will convert it from A-Z to a control value from 1 to 26 or 1H to 1AH. Only one control character per command line is allowed. Note the control character will NOT be displayed on your video display unless the host sends it back.

[CRLF {on/off}	FastTerm II has the ability to handle carriage returns and linefeed characters separately. If you have this option on, a CR will move the cursor to the start of the line and a LF will advance it one line. With it off, a LF character will be ignored and a CR will move the cursor to the start of the line and automatically generate a linefeed.

[DEFAULT	this will reset the following items (wether they are presently on or off) ;  trace mode, remote echo, local echo, clock display, out going linefeeds, emulation set to TTY, no auto output of charges, charge display, printer output, capture buffer,  and split screen.

[DTR	will cause the RS232 to drop DTR and will resume with the proper level in approximately 2 seconds later. This will almost always enable the modem to terminate the connection. Some modems may not respond well to this method of interrupting the communications session. Also once you use this command, always leave at least two seconds before you try to send any commands to the modem. Many modems take that long to reset themselves after a DTR change.

[ECHOL {on/off}	will control the local echo as per the ON or OFF command. If nothing is specified, ON is assumed.

[ECHOR {on/off}	will turn the remote echo on or off as indicated by the ON or OFF word following the command. If not specified, ON is assumed.

[END	although this is an optional command word, try to get into the habit of using to end all of your scripts. I.e. this should be the last line of your script file.

[ENDIF	All [IF statements must end with [ENDIF. Failure to end conditional IF statements with [ENDIF will cancel the script operation. Although you can not have nested IF statements you may use any number of them in a sequential fashion as shown in the IF command.

[ESC	will cause FastTerm II to send an ESCAPE code to the remote. The esc value is 1BH or 27 decimal. This value will NOT be shown on your model 4 screen unless sent back from the remote.

[FLUSH	will completely empty the RS232 buffer of any received characters in it.

[GET1KX filespec/ext:d	will receive a file from the remote using the filename specified. It uses the 1K xmodem CRC protocol. If wanted, you may use a variable to pass the filename and drive to the command. [GET1KX %1 is an acceptable format. Quotes surrounding the filename should not be used with this script command.

[GETLINE (#)  V#	where (#) is the length of the input up to 80 characters and V# is a variable from 0 to 4. This command will allow you to receive directly into one of the 5 variables allowed in FastTerm II up to 80 characters (default or whatever you have it set to). Storing in the variable will be terminated at the first control character, carriage return, linefeed or when the specified length is received and the script will then continue processing. 

[GETXMD filespec/ext:d	will receive a file from the remote using the filename specified. Uses the standard xmodem protocol with auto CRC or Checksum detection. If required, you may use a variable to pass the filename and drive to the command. [GETXMD X %1 is an acceptable format. Quotes surrounding the filename should not be used with this script command.

[GOSUB "label"	where the label is defined elsewhere in the script as a label. The subroutine  must always end with the [RETURN statement. Execution after the return from the subroutine will always start at the command following the GOSUB. You may use a variable to pass the label name to the GOSUB command. I.e. [GOSUB %1 is an acceptable format. You may also nest the GOSUBs up to 10 levels deep. Note that when you nest GOSUB commands it is in the normal computer based format. The first return found will return to the last GOSUB that was used. Therefore it is possible to have a serious logic error. Partcularly if you use GOTO within a GOSUB routine. Be careful with this command.

[GOTO "label"	where the label is defined elsewhere in your script as a label. The goto is an unconditional move to a new location. You may use a variable to pass the name of the label you want to move to. Once there the script processor will start to execute code immediately following the LABEL command.

[IBM	if your TRS-80 is equiped with the Anitek ROM which allows you to display the IBM graphic/charset you may use this script command to enable it on your screen. Note you should also have the [MASKBIT command turned off for it to work properly. When you are finished with this command, you should always use the [TRS script command to return your display to normal mode and disable the Anitek character generator.

[IF str1 {=?} str2	Where str1 is the string you want to check for and str2 is the string you want to check it against. Options are = where both strings must match to the length of str1. Second option is ? which will check to see if the string in str1 is contained in str2. You may use variables for the str1 or str2 and a literal string for str1 (it must be enclosed in quotes if a literal string is used). Typical examples are :
	[IF "Name" ? %0
	do something
	[ENDIF
	[IF %1 = %0
	do something
	[ENDIF
	All examples must end with [ENDIF as shown. Failure to end conditional IF statements with [ENDIF will cancel the script operation. Although you can not have nested IF statements you can use any number of them in a sequential fashion as shown.

[KEYIN "text" V#	will display a prompt on the screen so that you may define one of the variables directly from the keyboard. The # sign may be a number from 0 to 4. Rather than use the [WRITE command to provide a prompt, you can use a literal string which will be displayed on the screen only and followed by the prompt. I.e. [KEYIN "Enter the Filename : " V2 is an acceptable format.

[LABEL "label name"	where label name is a name which was referred to by either a GOTO or GOSUB command. FastTerm II will take no action of any kind when reading or stepping through the script file when it comes across a label command. They are only used for the GOTO and GOSUB routines. Only alphanumeric characters are allowed in a label name.

[LINEFEEDS {on/off}	will control the outgoing linefeeds.. If no argument is supplied, ON is assumed.

[MASKBIT {on/off}	will enable/disable the 8th bit received as is done in the Buffer window menu.
  
[PAUSE	will immediately stop execution of the script file. The |S| at the top of the screen to indicate scripting is in effect will flash to indicate a pause mode. To remove the pause and continue with the script operation, use the key combination of CLEAR SHIFT C (for continue).

[PRINT {on/off}	will route incoming text to the printer depending on the ON/OFF selection.

[REDAIL "phone number"	will redial the number following this command. You should have a HAYES modem and be using the AT command set. It is not meant to be used with a Radio Shack modem. FastTerm II will continue to redial the modem until either a connection is made OR you use the SPACE BAR to cancel the redial and advance in the script. Pressing BREAK will cancel the script and will not advance. For maximum efficiency use the X3 option command in your command line. i.e. ATX3DT #####. If you dont use the X3 command your modem will dial out approximately once a minute. If you do it will redial when it receives a BUSY signal. If you have a 100% compatible HAYES modem, use additional commands &C1&D1 as well. In this case your command line would look like ATX3&C1&D1DT ####### etc. Those commands control your DTR and Carrier Detect settings for FastTerm II. If they are not set correctly it may not be able to detect a carrier properly. During a redial function FastTerm II will display calling progress by displaying either Busy or Timeout on the video with a counter for each time the number is dialed.

[REM	any thing appearing on this line will be ignored and serves only as a programming aid when you are writing scripts. Any line starting with this command will not be loaded into the script buffer so this will permit you to use as many REM statements in your script as you want without having to worry about losing buffer space.

[RESET TC	will reset both elapsed time and charge time to 00:00:00.

[RETURN	this command must always be used to terminate a GOSUB routine. Failure to do this will result in the script continuing execution from the subroutine to the end of the program.

[SEND "Text" or %1 {\}	this command will send out either a literal string enclosed in quotes or a variable. This command works slightly different than just placing the text on a line and having FastTerm II send the line directly. Normally this command will send out a C/R after the text or variable. If you wish to suppress this option, append a \ to the end of the line. I..e. [SEND PASSWORD\ which will send the text but not a carriage return. This can be used best when you are using a BBS system which uses HOT KEKS that do not require that you press ENTER/RETURN after your selection.

[SET V# "text"	will define the variable referenced by the # sign from within the script. Only 39 characters may be used and any additional ones will be automatically purged. The # sign may be any number from 0 thru 4.

[SND1KX  filespec/ext:d	will send an xmodem file to the remote using the 1K xmodem CRC protocol. If required a variable can be used to pass the filename and drive information. [SND1KX %1 is an acceptable format. Quotes surrounding the filename should not be used with this script command.

[SNDASC filespec/ext:d	will send and ASCII file to the remote using the filename specified. Note it will not be shown on your video display as it is sent (its direct from disk). If required a variable can be used to pass the filename and drive information. [SNDASC %1 is an acceptable format. Quotes surrounding the filename should not be used with this script command.

[SNDXMD filespec/ext:d	will send a standard xmodem file to the remote using the filename specified. Will automatically detect if you need CRC or checksum modes. If required a variable can be used to pass the filename and drive information. [SNDXMD %1 is an acceptable format. Quotes surrounding the filename should not be used with this script command.

[SPLIT {on/off}	will enable the split screen mode to be enabled or disabled. If no argument is supplied, ON is assumed.

[SWAP %# %#	this command will swap two variables. The # signs can be any variable numbers from 0 thru 5. The information in each variable will be exchanged with the other.

[TRACE {on/off}	using this command will cause the scripting processor to display 45 characters from each of the scripting commands read in from the script file. The very top line of the video will be used for the display. Each time the script command is displayed, there will be a two second delay so that the operator has time to see it.

[TRS	this scripting command will cancel the [IBM command. Mainly it is used to disable the Anitek IBM character generator chip so that the normal TRS-80 graphics are displayed.

[TTY	will select NO emulation of any kind.

[TWAIT ##	where the ## is the delay in seconds you want to wait. No characters can be sent or displayed on your screen during this mode and scripting is paused until the time specified is completed.

[VIDTEX	will cause FastTerm II to react to the Compuserve VIDTEX screen formatting commands.

[VT100	will cause FastTerm II to simulate a VT100 terminal.

[WAIT FOR "text"	will copy the string following this command to a special buffer and will pause scripting until the string is matched. The string may be a word, sentence or partial form of either so long as the total length is under 41 characters. This command will wait one minute for the string specified after which it will continue in the script as if it had received the information. This prevents FastTerm II from getting locked online. A variable can be used for the string but be aware that only 40 characters will be allowed for the match. Therefore if you variable is a full 80 characters, Wait For will only look through the first 40.

[WAIT TIME "hh:mm:ss"	will cause FastTerm II to wait until the time in the script matches the time on your clock of the Model 4. It provides an exact match so ensure that a correct time is used. The clock string must be in the format HH:MM:SS and in 24 hour mode. Scripting is halted until the time is matched so no characters will be displayed on your screen during that time. Your real time clock setting will be display on the underline under the WHO menu heading, the time you entered in the script will be displayed under the TRANSFER menu heading. This is to provide visual feedback. If you want to continue processing while in a WAIT TIME command just press the SPACE BAR. FastTerm II will cancel the time matching and continue operation. A variable may be used to pass the time argument to the script.

[WINCLR	erase all contents of the FastTerm II script display window. This is the window you fill with text using the Winline command.

[WINDSP	display current window (or whatever is in it at the time)

[WINHIDE	remove current window from screen (hide it).

[WINKEY "text" V#	does an input inside the displayed window. It only works properly if the window is active and there is no way to tell if the window is not present. Uses the bottom line of the window as an input line and doesnt disrupt the video display. Try to keep the text short since it must fit within the confines of the window. Usually 15 characters are available.

[WINLINE # "text"	where # is the line number in the window, and text is what you want to move to there. Its alwaya padded to remove any previous characters. A null simply erases that line. You may use a variable for the TEXT only part of the command. You can not use a variable as the LINE NUMBER of the window. There are 6 lines for your use in this command (1-6) which replace the # sign in the command. Up to 58 characters will be used from your literal text line or variable.

[WRITE "text" {\}	will display the string of text following to the screen but will not send it to the modem. If you want to suppress the C/R normally sent out by this command, simply append a \ to the end of the line. I.e. [WRITE Connected to Maniac Mansion\ will display the text on your screen, but not move the cursor to the next line.


Special Control Characters

There are some special control characters which can be entered from the keyboard while in the scripting mode which will affect the operation of the script. Press and hold down the [CLEAR] and then [SHIFT] and finally the letter of the function.

CLEAR SHIFT A	will abort the script currently being used. There is no recovery from this command so make sure it is what you want when you select it.

CLEAR SHIFT C	if the script is in the [WAIT FOR mode and due to line noise or whatever it misses the matching string, you may press this key combination, in this order and it will send the string as if it had received and made a match. From this point the script will continue normally. Remember Wait For always times out in a minute. This key combination is also used to start the script file again after a [PAUSE command.

CLEAR SHIFT E	if your script has an error in it, such as a command not recognized use this command to bring the line error to the display. Then you can exit your terminal program and edit it with your text editor.

CLEAR SHIFT V	will display the current version of the scripting command processor. As new words are added or changes are made, this message will always reflect the version number. While the version of FastTerm II itself may not change the scripting version may.

CLEAR SHIFT W	will display the total word list currently supported by the scripting command processor.


Script Activation from Terminal Mode

You can invoke a script without having to dial a number. Use the CLEAR and number keys (1-9) to invoke any script in the current scripting window while you are in the terminal mode. If desired you can also start a script when you first execute FastTerm II. After you type in the FastTerm II filename append a comma and the script filename you want executed. I.e. FTII,myscript/scr;1


Script Menu Window

In the SCRIPT menu window there is a place for the length of your script to be displayed. Once it is loaded you can check this window and see just how long that script is. Beside it is another area called Status. If the script processor encounters a script word which is not in the vocabulary,  a logic error, return without gosub, or syntax this box will show ERROR otherwise it will show GOOD.


Script Errors

If a script error is shown in the status box, you should return to the terminal mode and press CLEAR SHIFT E. FastTerm II will display the line in which the error occurred on your screen. If there was no error, nothing will be shown.


Scripting Hints

If you are writing scripts for speed it is always best to put your subroutines at the beginning of the file. The script processor in FastTerm II always starts looking for labels at the start of the program. If you place your labeled routines at the start of the file, FastTerm II will be able to find them that much faster. This is especially true when working with GOSUB. A gosub at the end of your program which refers to a label at the beginning of it will execute the script within the subroutine and return (since RETURN uses an address and not a label search) much faster than the other way around.

Use a GOTO to skip over any subroutines at the start of your scripts helps to get around subroutines. Use GOSUB as much as possible but be careful to always have a RETURN and not to have more than 10 levels deep. If you dont follow this, the script processor will not be able to find its way back and will cancel the script on you.

If you are in a Wait For mode or have control of the keyboard even though a script is running, you can view where the script pointer is if you have to. Use the BUFFER window and press "L" to list the script. A graphic bar is drawn where the script pointer is currently executing. This will let you see what commands are next. You should be aware that the commands are purged for [REM statements or any blank lines at loading so it will probably be a very compact script. If no script is running, this command option is not available.


--------------------------------------------------------------------------------Sorry about the translation of this file. It was written in Microsoft Word on
my Macintosh and just moved onto the Model 4. Some of the characters are a
little bit different than plain ASCII. Specifically the "" where there are two
different values on the Mac for OPEN and CLOSE typographical quotes. So if you
see a couple of weird looking characters surrounding a word or letter, you can
be pretty sure it's the quotes. Another one would be the ' symbol which is
different. Again, sorry but I though the other 98% of the information would be
valid so I moved it across.

Mel Patrick
