home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
OS2SHASP.ZIP
/
OS2SHARE.ASP
Wrap
Text File
|
1992-01-20
|
4KB
|
112 lines
; ***********************************************************************
; * *
; * OS2SHARE.ASP *
; * by Roy M. Randall 01/19/92 *
; * *
; * A Procomm Plus Aspect script language file to automate the use of *
; * the Offline Reader function of the OS/2 Shareware BBS, a Maximus *
; * BBS system. Zmodem is the default protocol. The modem is set up *
; * to return verbose replies. The upload and download files are *
; * expected to be in the D:\ directory. The path names in GETMAIL *
; * and SENDMAIL should be edited to match your preferences. The modem *
; * settings in DIALUP may need changing also. *
; * *
; ***********************************************************************
PROC MAIN ; Main Loop
ASSIGN S0 "385-0931" ; first phone number.
ASSIGN S1 "385-4325" ; second phone number.
ASSIGN S2 "USER NAME^M" ; User's name.
ASSIGN S3 "PASSWORD^M" ; User's password.
WHEN 0 "Press ENTER to continue" TRANSMIT "^M"
IF NOT FROMDDIR ; if called from the command line or
CALL DIALUP ; Alt-F5, manual dial.
ENDIF
CALL LOGON ; Log on to BBS.
WAITFOR "Select:" ; Main Menu.
TRANSMIT "O^M" ; Go to the Offline Reader Menu.
WAITFOR "READER:" ; Make sure we're there.
WAITFOR "Select:" ; Offline Reader Menu.
CALL SENDMAIL ; send stuff.
WAITFOR "Select:" 10 ; Short timeout, this one gets missed.
CALL GETMAIL ; get stuff.
CALL LOGOFF ; get out.
WAITFOR "NO CARRIER"
QUIT ; exit Procomm Plus
ENDPROC
PROC DIALUP ; Manual dial.
SET BAUD 2400 ; Explicitly set up terminal
SET PARITY NONE ; because we haven't called this
SET DATABITS 8 ; from the Dial Directory.
SET STOPBITS 1
SET DUPLEX FULL
SET PORT COM2
SET EMULATION ANSI
DIALIT: ; This loop does the dialing.
MDIAL S0 ; If the first number is busy,
IF NOT SUCCESS ; the user can hit <Esc> and
MDIAL S1 ; the script will try the second
IF NOT SUCCESS ; number. <Esc> again will toggle
GOTO DIALIT ; back to the first number.
ENDIF
ENDIF
ENDPROC
PROC LOGON ; Logs user into the BBS system.
PAUSE 4
LOOP:
TRANSMIT "^M^M" ; knock, knock.
WAITFOR "BBS, or wait 10 seconds." 1
IF NOT WAITFOR
GOTO LOOP ; I said, KNOCK, KNOCK, dammit!!
ENDIF
TRANSMIT "^[" ; send Escape character, ASCII 27
WAITFOR "name:" 120 ; who's there?
TRANSMIT S2 ; send user's name.
WAITFOR "Y" ; BBS echos name.
TRANSMIT "Y^M" ; yes, it's ME, dammit!
WAITFOR "Password:" ; prove it!
TRANSMIT S3 ; send user's password.
WAITFOR "mail? [Y,n]" 120 ; skip the mail check
TRANSMIT "N^M"
WAITFOR "files? [Y,n]" ; and the file check.
TRANSMIT "N^M"
ENDPROC
PROC SENDMAIL ; Uploads Reply Packet
ISFILE "D:\OS2SHARE.REP" ; Is there anything to send?
IF SUCCESS ; if so,
TRANSMIT "U^M" ; tell the BBS,
PAUSE 4
SENDFILE ZMODEM "D:\OS2SHARE.REP" ; and do it.
IF SUCCESS ; Did it work?
DOS "DEL D:\OS2SHARE.REP" NOCLEAR ; then we won't need this anymore.
ENDIF
ENDIF ; if not,
ENDPROC ; forget it.
PROC GETMAIL ; Downloads the Mail Packet.
TRANSMIT "D^M" ; Request a Mail Packet,
ISFILE "D:\OS2SHARE.QWK" ; Is there an old one around?
IF SUCCESS ; if so, delete the oldest,
DOS "DEL D:\OS2SHAR2.*" NOCLEAR ; and rename the others.
DOS "REN D:\OS2SHAR1.* OS2SHAR2.*" NOCLEAR
DOS "REN D:\OS2SHARE.* OS2SHAR1.*" NOCLEAR
ENDIF
WAITFOR "QWK format [Y,n]?" 300 ; Wait while the BBS searches.
TRANSMIT "Y^M" ; Confirm the download.
WAITFOR "Select:" FOREVER ; this could take a while.
ENDPROC
PROC LOGOFF ; Let's get outta here!
TRANSMIT "G^M" ; bye-bye
WAITFOR "Disconnect [Y,n,?=help]?" ; are we sure?
TRANSMIT "Y^M" ; YES, DAMMIT!
WAITFOR "[y,N,?=help]?" ; leave our host a message?
TRANSMIT "N^M" ; Not tonight, thanks.
ENDPROC