Autopuma - Telix script to add Bimodem, MPt/Puma, HS-Link, and DSZ/GSZ/SZmodem as auto-download protocols. Shows BBS name on status line, other minor features. Includes scripts for Bimodem, MPt, HS/Link and GSZ uploads and downloads.
Autopuma is a script that adds a number of trivial abilities to Telix, such as displaying the BBS name on the status line, automatically starting MPt/Puma, BiModem, and SZmodem or GSZ downloads when the host begins sending, exiting or disconnecting if Telix has not been used, and displaying incoming bells on the screen.
WHY IS AUTOPUMA?
Originally this script simply started Puma (since renamed to MPt) downloads anytime the Puma string was sent by the host, as Telix already does with Zmodem (hence the name, which I have never bothered to change). But I also have a small BBS on the same machine that I use for downloads. Often I would start a download from another BBS then have to leave before the download finished. I'd either have to abort the download to bring up the BBS, or leave with the download still going, and wait until I got back to bring up the BBS. I had some kluges to bring up the board when the download finished, but they required I remember to trigger them before I started the download.
Since I already had this script running "in the background" all the time anyway, I added the ability to monitor activity and bring up the BBS after Telix was left unattended for some amount of time. Then I though it'd be nice if Telix brought up the board for an incoming call. I gave it to a friend who asked for a few more things, then I needed more things...
AUTOPUMA.SLC AUTOPUMA script ("resident" portion). APCONFIG.SLC Configuration script. APSMALL.SLC Small version of AUTOPUMA.SLC. APSCNFG.SLC Configuration script for APSMALL.SLC. APLOG.SLC Script used by Autopuma for call logging. BIMODXFR.SLC Used by Autopuma to start Bimodem and HS/Link transfers. BIMODXMT.SLC Bimodem upload script. BIMODRCV.SLC Bimodem download script. BIMODEM.SLC Script similar to that included with BIMOD124, with minor changes to ensure compatibility with BIMODXMT/BIMODRCV. BIMODEM.SLT BIMODEM.SLC script source. HSLNKXMT.SLC HS/Link upload script. HSLNKRCV.SLC HS/Link download script. MPTXMT.SLC MPt upload script. MPTRCV.SLC MPt download script. MPTXMT.SLT MPTXMT.SLC script source. MPTRCV.SLT MPTRCV.SLC script source.
Autopuma Page 2
SZMODXMT.SLC SZmodem upload script. SZMODRCV.SLC SZmodem download script. SZMODXMT.SLT SZMODXMT.SLC script source. SZMODRCV.SLT SZMODRCV.SLC script source. GSZXMT.SLC GSZ Zmodem upload script. GSZRCV.SLC GSZ Zmodem download script. GSZXMT.SLT GSZXMT.SLC script source. GSZRCV.SLT GSZRCV.SLC script source. AUTOPUMA.DOC This file. AUTOPUMA.WP5 WordPerfect 5.1 version of this file. FILE_ID.DIZ Description file for BBSes that use PCBDescribe or a similar utility.
The difference between the large and small versions is where the code for Autopuma's configuration window resides. This code takes up about 24K of RAM. In the large version it resides in the AUTOPUMA.SLC script, which gives faster response when changing the configuration, but takes up memory you may need for things such as DOS shells and external protocols.
In the small version the configuration window code is in the configuration script, making the resident portion smaller (and the configuration script larger). However the configuration window will not respond as quickly as it does in the large version.
Choose the version of AUTOPUMA.SLC and APCONFIG.SLC you want to use, and copy them to the same directory as your other Telix scripts. If you use the small version of Autopuma rename APSMALL.SLC to AUTOPUMA.SLC, and APSCONFIG.SLC to APCONFIG.SLC. If you've never used scripts before you should first specify a script directory. From Telix, press ALT-O and select "Filenames and paths." Select "C" and enter the directory you want to keep scripts in. Make sure you save it ("Write setup to disk") then get back to DOS and copy AUTOPUMA.SLC and APCONFIG.SLC to that directory.
If you want Autopuma to run every time you run Telix, make a batch file (for instance "TLX.BAT") that contains:
and run this batch file instead of TELIX.EXE. To take advantage of some Autopuma features you may eventually need to run Telix from a batch file anyway. More on this later.
You may also want to define a key combination to run the configuration script. Press "ALT-K", select egular key table, dit, then choose a key combination (I use ALT-N), and define it as:
Autopuma Page 3
Run Autopuma, either from the DOS command line or batch file with:
or from within Telix by pressing ALT-G and giving AUTOPUMA as the script to run.
Run the configuration script (APCONFIG) with ALT-G from within Telix. This will bring up a window with Autopuma's available options.
A - Show BBS name on status line........ Yes
If this option is enabled, Telix will display the name of the dialing directory entry that you are currently connected on the status bar. If the name is 14 characters or less it will be displayed in the first 15 characters. Otherwise it's displayed in the first 26 columns.
For unregistered versions, the name is only displayed for 10 seconds.
B - If phone rings exit with............ Once: 100 Twice: 200
This allows Autopuma to force Telix to exit if a call comes in while Telix is offline. If "Once" is set to a non-0 value, and "RING" is received from the modem when there is no carrier, Autopuma will force Telix to exit, returning the value given as a DOS errorlevel. If "Twice" is set to a non-0 value, Autopuma will wait for two rings to come in from the modem, then exit from Telix with that errorlevel. If a second ring does not come in within 7 seconds of the first and an errorlevel is given for "Once", Telix will exit with that errorlevel instead.
A batch file can use the errorlevel to bring up a BBS, or some other software to handle incoming calls.
C - Exit on inactivity.................. After 20:00 with 100
If the time limit is not 0 and Telix detects no local or comm port activity within that time it will exit with given errorlevel.
D - Time out even if carrier present?... No
Autopuma Page 4
Usually Autopuma considers an active carrier as activity, and will not exit Telix if one is present even if nothing else is going on. If this option is set to Yes, an active carrier alone will not be considered activity, and Autopuma will exit Telix and hang up on an active connection if nothing is received from the host and no local activity is detected within the time limit given in option C.
E - Hang up if no activity for.......... 0:00
If this is set to a non-0 value and no activity occurs within that time, Autopuma will drop any active carrier.
F - Exit Telix on carrier loss.......... Off Once, with 100 Always, with 100
This will cause Telix to exit with the given errorlevel when the carrier is lost. I use this when I start a download and I know I won't be around when it finishes to bring up the BBS (most decent BBSes can be told to hang up after a transfer). If the option is set to "Once" and the exit is canceled, it will not reset, and the next time a carrier drops Telix will not exit. If set to "Always" and the exit is canceled the option will reset, wait for another carrier, then try to exit again when it drops.
G - Auto-download protocols............. P, B
These are the letters of the protocols that have been set up as auto- download protocols. Selecting this option displays the menu of available protocols that Autopuma can start automatically when the host begins sending. See AUTO-DOWNLOAD PROTOCOLS on page 6
H - Call log............................ CALL.LOG
This controls whether Autopuma logs calls made. If on, whenever a connection is made the date, time, name, directory entry and phone numbers (as they appear in the Telix dialing directory) are logged to the specified file. When the connection is dropped the length of the call is written. The intent here was something that looks the call itemization from a phone bill, rather than a Telix usage log.
There are some other things that could be done with this, but I'd like to know if anyone finds the idea useful before I put more effort into it.
I - User defined string................. hang up now
This can be any string that should trigger some action when sent from the host.
J - User defined command................ Hangup
Autopuma Page 5
This is the action that the user-defined string will trigger. Available commands are:
Nothing No action. Hangup Hangs up the phone. Exit Exits Telix with an errorlevel. DOS command Runs a DOS command in a sub-shell. Script Runs a SALT script. Receive File Receives a file. Send Text Sends text out the comm port.
If the command requires additional information (errorlevel to exit with, DOS command or name of script to run, etc.) Autopuma will prompt for it. Autopuma will also ask how long it should delay between receiving the string and performing the command.
Unregistered versions of Autopuma will allow options H and I to be set, but will only display a message when the string comes in.
K - Visual bells........................ Off Always, 0.5 seconds If no sound, 0.5 seconds
Autopuma can display "BELL!" in the center of the screen for a user- selectable duration anytime a bell is received. Useful for environments where silence is required, but you still want to know if the host wants your attention.
L - Seconds to delay before exit........ 0:10
In most situations that trigger an exit from Telix, Autopuma will display a countdown timer before exiting to allow a chance to abort. This sets the length of the delay.
M - Show timer or clock on status line.. Neither Timer Clock Always Clock if no Timer
If Telix status bar is enabled, Autopuma can display either the clock time or the length of time Telix has been inactive in the area that usually displays the script name. "Timer" displays the timer if it's relevant, otherwise the script name. "Clock Always" displays the current time. "Clock if no Timer" will display the timer if relevant, otherwise the current time is displayed.
N - Load options from disk.............. AUTOPUMA.CNF
This allows you to recall previously saved Autopuma configurations from a saved file.
Autopuma Page 6
O - Save options to disk................ AUTOPUMA.CNF
This will save the current Autopuma settings to a disk file.
P - Unload Autopuma
This removes Autopuma from memory
There are one other option available from this menu that is not displayed. By default Autopuma disables the ESC key's ability to abort scripts. On some machines however this slows the script down, sometimes intolerably. ALT-ESC will toggle the enabled/disabled state of the ESC key. This may speed up Autopuma, but will prompt you with "Abort Script?" whenever the ESC key is pressed. The state of the ESC key is saved to the Autopuma configuration file.
Autopuma can automatically start downloads for certain protocols when the host begins sending. Protocols currently supported are MPt (earlier versions were called Puma), BiModem, HS/Link and SZmodem. To set which protocols Autopuma should start, choose "Select auto- download protocols" from the configuration menu. This brings up a menu that allows you to select the letters you have assigned to the protocols, whether Autopuma should start them automatically, and other information. The menu looks like this:
A - MPt/Puma........... P, On B - BiModem............ B, On, 5 second delay C - HS/Link............ H, On, 5 second delay D - Zmodem............. D, On, resume w/Internal
Select a protocol (Return or Esc to exit)
Select a menu letter to edit a protocol (or if you want to edit a protocol that you have assigned a letter to that is not also a menu letter, you can type the protocol letter instead). Autopuma will ask first for the protocol letter. This is the letter you have assigned to the protocol in the Telix "File transfer protocols" configuration.
Autopuma will then ask if you want auto-downloads for that protocol. If you choose Yes, Autopuma will start a file receive with that protocol whenever the host machine begins sending.
General notes about Protocols
Autopuma Page 7
The distribution ZIP file for Autopuma contains Telix scripts for all the protocols it supports. The scripts do not require Autopuma and can be used even if Autopuma is not. Likewise, Autopuma doesn't require the specific scripts included in the ZIP. If you've already installed any of these protocols in Telix using batch files or other scripts, Autopuma should work fine with them.
All the upload scripts included with Autopuma accept multiple file names.
All the download scripts included with Autopuma will recognize the "Zmodem receive crash recovery" switch and pass the appropriate switches to the protocol driver. Note however that not all protocols support crash recovery the same way.
Both the upload and download scripts will sound an alarm on completion similar to the one Telix sounds if sound and alarms are enabled in Telix.
If a carrier is lost while an external protocol is running, Telix may not realize the carrier has dropped when it regains control. To "wake it up", all the scripts use a function that can briefly flip the port Telix uses to another port, then flip it back. This forces Telix to re-examine the port status, and recognize a dropped carrier.
By default the scripts will use COM8 as the port to flip to, or COM7 if COM8 is the port Telix was using. If this causes problems you can set the environment variable FLIPPORT to the port number to flip to. SET FLIPPORT=3 will force the scripts to use COM3 as the temporary port. If FLIPPORT is set to 0 no flip will be done.
Protocols must be installed in Telix in the Configuration Options' "Protocol Options" screen. MPt for instance would look like this:
Key Protocol Upload Download BAT or DL Name Filename Filename Script Name ------------------------------------------------------- P Puma/MPt mptxmt mptrcv Script N
In order for Autopuma to start an MPt download, you must have either PUMA.EXE 1.00, or MPT.EXE 1.10 or greater, and either batch files or SALT scripts for performing the transfer from Telix. If you use Puma instead of MPt, you can modify the MPt scripts included with Autopuma to use PUMA.EXE. The two programs are currently 100% compatible with each other.
Autopuma Page 8
In order for Autopuma to start a Bimodem transfer, you must have BIMODEM.EXE 1.24 or greater, and either batch files or SALT scripts for performing Bimodem transfers from Telix.
When setting BiModem up as an auto-download protocol, Autopuma will also ask for the length of time it should wait for upload files to be entered before starting a download.
The BIMODXFR.SLC script is also required by Autopuma for automatic Bimodem transfers.
To explain why Autopuma initiates Bimodem transfers the way it does, a short explanation of how it handles MPt downloads is required.
Autopuma begins a receive when it receives the handshake string sent by a protocol on the remote end that wants to send. This string is usually different than the handshake sent by the protocol when it wants to receive, so there is no conflict.
On the other hand since Bimodem can transfer files in both directions at the same time, there is no distinct sender or receiver. Because of this Bimodem has only one handshake string. Autopuma can tell the host wants to initiate a transfer, but has no way of knowing if it should simply start a receive or if it should prompt for files to upload.
The approach it takes is this: When a Bimodem transfer is initiated by the remote computer, the user will be prompted to enter files to upload. If there is no response within the time set in Autopuma's configuration, a download is assumed. If files are entered an upload is assumed.
BIMODXMT.SLC and BIMODRCV.SLC will perform Bimodem transfers. Both scripts require BIMODEM.EXE 1.24 or greater. If a BIMODEM.PTH file exists in the Telix directory it will be used in the transfer. After the transfer the scripts will ask if you want to delete BIMODEM.PTH. If there is no response and the transfer returned a successful status, the file is deleted. If the transfer failed, the file is retained.
NOTE: In the box Autopuma displays for entering filenames, strings of up to 241 characters can be entered. The Bimodem scripts included in the Autopuma ZIP file will accept file lists this long, but other Bimodem scripts will not. If you use different scripts to drive Bimodem the file list should not exceed the length of the window.
BIMODEM.SLC is the same as the BIMODEM.SLC included in the Bimodem distribution ZIP file, except it ensures that the BIMODEM.CFG and BIMODEM.PTH files are created in the default Telix directory, which is where BIMODXMT and BIMODRCV expect to find them. This will allow you to mark uploads (and on hosts that permit it, downloads) offline through BiMenu, then connect to the host and start the transfer, letting Autopuma start Bimodem automatically.
Autopuma Page 9
In order for Autopuma to start an HS/Link transfer, you must have HSLINK.EXE 1.0 or greater, and either batch files or SALT scripts for performing HS/Link transfers from Telix. Note that while it's widely available on BBSes, as of this writing HS/Link is still in beta test so take appropriate precautions. This version of Autopuma, and even the current version of HS/Link may not be compatible with future versions of HS/Link.
When setting HS/Link up as an auto-download protocol, Autopuma will also ask for the length of time it should wait for upload files to be entered before starting a download.
The BIMODXFR.SLC script is also required by Autopuma for automatic HS/Link transfers. Since HS/Link is bidirectional Autopuma treats it like Bimodem in many respects. The only significant difference is that if HS/Link on the host has been told to send files it sends a different handshake than if it had been told only to receive, so Autopuma can tell an upload request from a download. It will only start an HS/Link download if the host has files to send.
In order for Autopuma to start an SZmodem download, you must have SZMODEM.EXE 1.41 or greater, and either batch files or SALT scripts for performing the transfer from Telix.
When setting SZmodem up as an auto-download protocol, Autopuma will ask if Telix' internal Zmodem should be used if the Telix "Zmodem receive crash recovery" option is set. Though SZmodem is compatible with Zmodem, until version 1.60 it had no option to resume an aborted transfer (and even 1.60 does not implement it usefully). By using Zmodem if Telix "Zmodem receive crash recovery", aborted files can still be resumed without disabling SZmodem auto-downloads.
Because SZmodem uses the same handshake string as Zmodem, if the remote computer started a Zmodem send when both Telix "Zmodem auto- downloads" option and Autopuma SZmodem auto-downloads were enabled, which protocol got started would be a matter of who saw the string first. Worse, once the winner finished the transfer, the loser would then start another receive.
To eliminate this problem, Autopuma will disable Zmodem auto-downloads when SZmodem auto-downloads are enabled in the Auto-Download Protocols menu, or when a configuration is loaded that turns on Auto-SZmodem. After that, if Zmodem auto-downloads are enabled without disabling SZmodem auto-downloads, Autopuma will suspend SZmodem auto-downloads.
Autopuma Page 10
Caveats about SZmodem:
Though SZmodem 1.60 has a command line switch to specify receive crash recovery, it will only do the resume if the sending system specified a resume as well, and earlier versions of SZmodem already did that. All 1.60 adds is the ability to SUPPRESS a resume that the sender requested. Since most BBSes don't (and shouldn't) use resume options, SZmodem's resume option is not currently very useful.
If an incoming file already exists on the receiving system and file resume is not in effect, SZmodem will skip the file. It has no option to allow renaming the incoming file as Telix will.
On my system SZmodem hangs if the 16550 buffer is enabled. Telix must be told to disable the buffer in DOS shells, and SALT scripts must execute SZmodem with the "dos()" (not "run()") function.
Using GSZ or DSZ for Zmodem downloads.
In order for Autopuma to use GSZ or DSZ as the Zmodem driver, you must have a REGISTERED version of GSZ or DSZ, and either batch files or SALT scripts for performing the transfer from Telix.
If you wish to use DSZ rather than GSZ, substitute the name of a DSZ script. The source for the GSZ script included with Autopuma can be modified to use DSZ.
To make Autopuma use these as the Zmodem drivers, follow the instructions for installing SZmodem, but use the letter you have assigned to the GSZ driver. For "Use Zmodem to resume aborted downloads", answer "N" if the script supports setting the "resume" switch for GSZ if Telix "Zmodem receive crash recovery" is enabled. The scripts included with Autopuma do.
Caveats about GSZ/DSZ:
If an incoming file already exists on the receiving system and file resume is not in effect, by default GSZ will skip the file. A "-c" option is mentioned that is supposed to allow renaming of incoming files, but I can't get it to work. The GSZ scripts included with Autopuma instead use "-n" which will cause GSZ to overwrite the existing file only if the incoming file is newer.
If call logging is enabled, Autopuma will keep track of when, how long, and who you call. Log entries look like this:
09-15-91 23:54 (110) Dead of Night ! 301 277 6703 (00:01)
Autopuma Page 11
     
1) Date of call 2) Time of call 3) Dialing directory entry number 4) BBS name 5) Phone number 6) Length of call, rounded up to next minute.
AUTOPUMA AND ERRORLEVELS
To be useful, any option that forces Telix to exit with an errorlevel requires Telix to be run from a batch file that uses the "if errorlevel" command to test the errorlevel and perform the appropriate action. For instance, if you want Telix to bring up a BBS if a call comes in, you need to set "A - If phone rings once exit with......" to a non-0 value (say, 100) and run Telix from a batch file that looks like this:
rem run Telix with AUTOPUMA telix sautopuma rem if returned 100 run command to start BBS ("board" in this case) if errorlevel 100 board
ENTERING VALUES IN THE CONFIGURATION WINDOW
Values used as errorlevels cannot exceed 255. Times cannot exceed 99:59:59.
If you need to enter characters into string values that are usually special (i.e. ENTER or ESC), press CTRL-V or CTRL-P, then the character. Characters that must be entered this way are ENTER, ESC, all CTRL characters and any ANSI "ALT" code. The following keys perform these functions:
ENTER: save changes and quit editing ESC: lose changes and quit editing Right arrow/CTRL-D: right one position Left arrow/CTRL-S: left one position CTRL-right/CTRL-F: right one word CTRL-left/CTRL-A: left one word HOME: beginning of string END: end of string DEL: delete character at cursor Backspace: delete character left of cursor CTRL-DEL: delete from cursor to end of word CTRL-Backspace: delete from beginning of word to cursor CTRL-END: delete from cursor to end of line CTRL-HOME: delete from beginning of line to cursor INSERT: toggle insert mode CTRL-P/CTRL-V: insert special character
Autopuma Page 12
CTRL-Y: clear entire line CTRL-U: undo all changes
For numeric and time values: Grey '+': increment value by one Grey '-': decrement value by one
For time values CTRL-Grey '+': increment by one minute CTRL-Grey '-': decrement by one minute ALT-Grey '+': increment by one hour ALT-Grey '-': decrement by one hour
CONFIGURING VIA THE ENVIRONMENT
Autopuma can also be configured partially or entirely through the environment rather than a disk file. The variable AUTOPUMA can be set to a string of options that tell Autopuma what to do. The easiest way to create the configuration string is to configure Autopuma through the configuration window, save the configuration to a file, then copy the configuration file into your batch file (or wherever). The config file is formatted as SET AUTOPUMA= to allow just that. If you want to edit or create the string yourself, the format is:
RUNNING ANOTHER SCRIPT
Autopuma can be made to run another script just after it loads, but before it begins it's own processing. If the environment variable AUTOSLC is set, Autopuma will run the script name it contains. If the variable contains a space, all text after the first space is passed to the script as a single string. If there is no argument, Autopuma will pass a null string to the script.
BKEY:,, is the letter that has been assigned to the Bimodem protocol in Telix' "File transfer protocols" configuration. is the "auto-downloads enabled" setting (0=off, 1=on). is the number of seconds that Autopuma will display the upload filename prompt box before it continues with what it assumes is a Bimodem receive.
CFN: This specifies the file from which Autopuma will read and write configuration information. When this option is encountered in a
Autopuma Page 13
configuration string, Autopuma reads the contents of that file and sets the configuration to it before continuing with the original configuration information.
CLOG:, is the "call log" setting (0=off, 1=on). is the path to the call log file.