;**************************************************************************** ;* This aspect file is the result of wanting to be able to run DSZ * ;* external zmodem protocol from ProComm Plus for Windows. The follow- * ;* ing is an amateur's attempt at creating a workable, user-friendly, * ;* professional looking interface between ProWin and DSZ (both very good * ;* programs that work well together). The text you are about to view is * ;* my actual working copy of "EXTernal PROtocol" and is geared specific- * ;* ally towards running DSZ on my computer. Hopefully I will include * ;* enough comments to help anyone convert to their own system should they * ;* so desire. I ask nothing of or for this script file. It is rough and * ;* not completely tested. I hope, however, it will help or inspire some- * ;* one else to create as I have been helped and inspired by things I have * ;* downloaded. Much of the procedure REST_SCRIPT came from a download I * ;* got from the DataStorm forum on CompuServe. Thanks to he who provided * ;* it. I also wish to acknowledge the people of the DataStorm forum * ;* (both sysops and users) for their help and inspiration. I would like * ;* to especially thank Paul Heim and my father for their continuing help * ;* and advice. Now about the program. * ;* This script gives the user a dialog box with a directory listing, * ;* an edit box to enter the name of a file to upload, and the choice of * ;* uploading or downloading with three of my favorite protocols: DSZ * ;* Zmodem and Ymodem as well as HS/Link, a quick bi-directional protocol. * ;* The selection of the protocols is done with radio buttons. The script * ;* accesses .bat files which I wrote to use with ProComm Plus 2.01 (DOS). * ;* The user will have to create his/her own .bat files to work on their * ;* system. * ;**************************************************************************** #DEFINE NOMODEM "USR 9600PC-AUTO-NONE" ;Defines a non-modem connection. STRING FILELST = "C:\COMM\UPLOAD\*.*" ;My upload directory. STRING LISTFILE; ;Files user lists for upload. STRING ADDED ;Will be defined as .bat file to call. STRING VAR4 ;Unused variable (but necessary). STRING CON ;Will hold current connection. INTEGER DSZPROTO, STATUS ;Two integer values defined later in the script. PROC MAIN ;Main procedure. CALL UP_BOX ;Calls procedure to make a dialog box. WHEN DIALOG CALL CHK_BOX ;Checks for activity in the dial- og box and defines it with a procedure. WHILE STATUS != 1 ;Creates endless loop unless user ENDWHILE hits cancel pushbutton. ENDPROC ;Ends the main procedure. PROC UP_BOX ;This procedure creates the dia- log box. The value for which radio button is selected is carried in DSZPROTO. dialogbox 52 33 252 205 3 "External Protocol Options" text 8 7 84 17 left "Files available for upload from the directory:" text 106 7 99 19 left "List file(s) for upload with a space between each if batch." pushbutton 28 158 40 14 "OK" normal pushbutton 28 184 40 14 "Cancel" cancel radiobutton 108 95 85 9 "Zmodem Moby (batch)" dszproto radiobutton 108 106 74 10 "Ymodem-G (batch)" radiobutton 108 118 62 9 "HSLink (batch)" radiobutton 108 152 126 10 "Zmodem (batch w/ crash recovery)" radiobutton 108 165 65 10 "Ymodem (batch)" radiobutton 108 177 62 9 "HSLink (batch)" endgroup dirlistbox 12 36 70 105 filelst single var4 dirpath 8 25 71 8 editbox 101 36 121 40 listfile groupbox 101 81 100 52 "Upload Protocols" groupbox 101 140 140 53 "Download Protocols" enddialog ENDPROC PROC CHK_BOX ;This procedure checks to see what kind of dialog event has taken place. STATUS = $DIALOG ;Status takes integer value of $DIALOG through rest of script. IF STATUS != 10 ;If OK button selected, continue RETURN with REST of SCRIPT. Otherwise ENDIF RETURN to WHEN statement in CALL REST_SCRIPT main procedure. ENDPROC PROC REST_SCRIPT ;Rest of script. INTEGER TXFER ;Integer value of running DOS application. SWITCH DSZPROTO ;Depending on integer value of CASE 1 DSZPROTO (decided by which ADDED = "ZM0D-U.BAT " radio button was selected), ENDCASE ADDED will take on value of CASE 2 filespec to call. Notice space ADDED = "GM0D-U.BAT " after .bat file names: very ENDCASE important (",,,.BAT "). CASE 3 ADDED = "HS-U.BAT " ENDCASE CASE 4 ADDED = "ZM0D-D.BAT " ENDCASE CASE 5 ADDED = "GM0D-D.BAT " ENDCASE CASE 6 ADDED = "HS-D.BAT " ENDCASE ENDSWITCH FETCH CONNECTION TYPE CON ;Get current connection values to store for later. SET CONNECTION TYPE NOMODEM ;Disables ProWin's control over COM port. You will need to select your modem's NONE from Setup (Connection). STRCAT ADDED LISTFILE ;Marries the values of .bat file and files listed for upload. DOS ADDED TXFER ;Shells to DOS and runs DSZ. WHILE ISTASK TXFER ;Endless loop until application ENDWHILE is done. SET CONNECTION TYPE CON ;Resets connection to former values. EXIT ;Ends script file. ENDPROC