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 in italics after the command. Note also that some commands may use the variables instead of the options parameters shown in italics.

[APPENDIf 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 will 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.

[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.

[GETLINE V# this command will receive up to 80 characters from the remote connection and place them in the variable referenced by the # sign. The storing will stop when the 80 characters have been received or when you receive a carriage return or linefeed (it will be changed to a carriage return by FastTerm II). The # sign may be a number from 0 thru 4 to give you a total of five variable storage areas.

[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.

[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.

[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 namewhere 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.

[SET V# 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.

[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.

[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.

[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.

[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.


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 Awill 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 Cif 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 Eif 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 Vwill 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 Wwill display the total word list currently supported by the scripting command processor.
