Page 1 AUTOPUMA Enhancement Script for Telix WHAT IS AUTOPUMA? Autopuma is a script that adds a number of trivial abilities to Telix, such as exiting or disconnecting if Telix has not been used, displaying incoming bells on the screen, and automatically starting MPt/Puma and Bimodem downloads when the host begins sending. 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... FILES INCLUDED: AUTOPUMA.SLC AUTOPUMA script ("resident" portion). APCONFIG.SLC Configuration script. APSMALL.SLC Small version of AUTOPUMA.SLC. APSCNFG.SLC Configuration script for APSMALL.SLC. BIMODXFR.SLC Used by Autopuma to start Bimodem transfers. BIMODXMT.SLC Bimodem upload script. BIMODRCV.SLC Bimodem download script. BIMODEM.SLC Script similar to that included with BIMOD124, with minor changes to allow compatibility with BIMODXMT/BIMODRCV. BIMODEM.SLT BIMODEM.SLC script source. MPTXMT.SLC MPt upload script. MPTRCV.SLC MPt download script. PUMAXMT.SLC Puma version of MPTXMT. PUMARCV.SLC Puma version of MPTRCV. MPTXMT.SLT MPTXMT.SLC script source. MPTRCV.SLT MPTRCV.SLC script source. Page 2 WHO.SLC Tells who current/last connection was to. AUTOPUMA.DOC This file. AUTOPUMA.WP5 WordPerfect 5.1 version of this file. The difference between the large and small versions is where the code for Autopuma's configuration window resides. This code takes up about 22K 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. Which version of Autopuma and the configuration script you use is up to you. INSTALLATION: 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, press ALT-O from Telix 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 the appropriate versions of 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: TELIX SAUTOPUMA 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: @APCONFIG or "@APSCNFG" if you use the small version of the configuration script. USING AUTOPUMA: Run Autopuma, either from the DOS command line with: Page 3 TELIX SAUTOPUMA 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. Options are: A - If phone rings once exit with....... 0 If this is set to a non-0 value, and "RING" is received from the modem when there is no carrier, Autopuma will exit Telix with that errorlevel. A batch file can use the errorlevel to bring up a BBS, or some other software to handle incoming calls. B - If phone rings twice exit with...... 0 If this 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 then Telix will exit with the errorlevel given in option A if it has been set. 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 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 Page 4 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 - Letter for MPT/Puma protocol........ P This is the letter you have assigned to the MPt protocol in the Telix "File transfer protocols" configuration. If this is set and "Zmodem auto-downloads" is enabled in Telix, Autopuma will begin a receive with this protocol when a ^VPuma^V or ^VMPt^V string is received. H - Letter for Bimodem protocol......... B This is the letter you have assigned to the Bimodem protocol in the Telix "File transfer protocols" configuration. If this is set and "Zmodem auto-downloads" is enabled in Telix, Autopuma will run the BIMODXFR script when the Bimodem handshaking string is received, which will prepare for a Bimodem transfer. The delay controls how long BIMODXFR will wait for a response to the "Filenames to upload" prompt. Bimodem transfers are discussed below. I - User defined string................. [none] This can be any string that, when received by Telix, should trigger some action. J - User defined command................ [none] This is the action that the user-defined string will trigger. The available options are: EXIT [errorlevel] Exits Telix with the errorlevel HANGUP Hangs up the phone SEND [text] Sends text out the comm port LOAD [file] Loads a configuration file SCRIPT [script] Runs a SALT script DOS [command] Runs a DOS command in a sub-shell Anything else is considered a DOS command and will be executed from a sub-shell. 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 about beeps. L - Seconds to delay before exit........ 0:10 Page 5 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. 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 two other options available from this menu that are not displayed. ALT-C will bring up a "color editor". This allows you to set the colors Autopuma uses to display the configuration window. The item to color is selected with up/down arrow, tab/shift tab, or home/end. Colors are selected with left/right arrow or the first letter of the color. The sample box will show what the colors will look like. Selecting "Set to saved Telix colors" will set the colors to whatever was last saved in Telix "Screen and color" menu. Note that these color settings are not saved anywhere. The next time Autopuma loads it will revert to Telix' saved colors. This feature may be removed in the future. The other is ALT-ESC. 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. MPT DOWNLOADS: Page 6 In order for Autopuma to start an MPt or Puma 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. MPt and Puma scripts are provided, but you can use others if you have them. The protocol must be installed in Telix in the Configuration Options' "Protocol Options" screen like this: Key Protocol Upload Download BAT or DL Name Filename Filename Script Name ------------------------------------------------------- P Puma/MPt mptxmt mptrcv Script N BIMODEM TRANSFERS 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. The BIMODRCV.SLC and BIMODXMT.SLC scripts are provided, but you can use others if you have them. The protocol must be installed in Telix in the Configuration Options' "Protocol Options" screen like this: Key Protocol Upload Download BAT or DL Name Filename Filename Script Name ------------------------------------------------------- B Bimodem bimodxmt bimodrcv Script N 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 an MPt receive when it receives the handshake string sent by an MPt protocol on the remote end that wants to send. This string is different than the handshake sent by an MPt that wishes to receive, so there is no conflict. On the other hand, Bimodem can transfer files in both directions at the same time, so 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: If 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. Page 7 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 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 CONFIG 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 Page 8 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 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: SET AUTOPUMA=[option[:arg1][,arg2]...]... Options and their arguments are: R1X: is the errorlevel Telix should exit with when one ring is received. R2X: is the errorlevel Telix should exit with when two rings are received. TOT: