home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
qns311.zip
/
Q-QM4.SCR
< prev
next >
Wrap
Text File
|
1991-02-19
|
4KB
|
77 lines
;┌──────────────────────────────────────────────────────────────────────────┐
;│ Q-QM4.SCR Copyright 1988-1991 by Rik Brown │
;│ │
;│ Qmail 4.x door script │
;└──────────────────────────────────────────────────────────────────────────┘
IF "$4" = "$maxulmail" LOGOFF ; Counter check: ul attempts
IF "$3" = "$maxdlmail" LOGOFF ; Counter check: dl attempts
SEND "^~OPEN $maildoor^M" ; Open door
WHEN ; Clear all WHENs
WHEN "(NS)?" "^~N^M"
WHEN "upcoming board function" LOGOFF ; Logoff if event is non-sliding
TIMEOUT 40 CARRIERDROP ; Wait max 40 secs for next line
WAITFOR "ommand?"
ULMAIL:
WHEN
WHEN "NO CARRIER" CARRIERDROP ; Error handling (carrier loss)
EXIST $maildir\success.SND DLMAIL ; Error handling (carrier loss)
IF "$2" = "0" DLMAIL ; Download .QWK if no .REP to send
INCR 4 ; Increment ULMAIL counter
SEND "^~^M" ; Get "command" prompt
TIMEOUT 10 DLMAIL ; Online test (grab command prompt)
WAITFOR "ommand?"
SEND "^~U^M" ; Upload current .REP packet
TIMEOUT 60 CARRIERDROP ; Wait max 60 seconds for ready
WAITFOR "Prepare to upload" ; MarkMail door is read to receive
PAUSE 1000 ; Pause 1 sec (or overrun next cmd)
DOS "qnssz.bat $maildir $mailUL" ; Call transfer BAT file
IF $OFFLINE CARRIERDROP ; Error handling (carrier loss)
PAUSE 1000
DOS "if exist $maildir\success.SND del $maildir\$mailUL"
; If mail upload was successful, it will be deleted. But if mail upload
; failed, it will be uploaded the next time the script is run. In this
; way no replies are lost. Pending mail files must be successfully uploaded
; before a totally new mail file can be created.
CLRSCR ; Exit DSZ status line
EXIST $maildir\success.SND DLMAIL ; Set to your location
PAUSE 6000 ; 6 sec pause for door to recycle
GOTO ULMAIL
DLMAIL:
WHEN
WHEN "NO CARRIER" CARRIERDROP ; Error handling (carrier loss)
WHEN "no messages were found" LOGOFF ; Skip download if no mail is found
WHEN "these messages" "^~^~Y^M" ; Download the packet
WHEN "unsuccessful" DLMAIL ; Try again if error
EXIST $maildir\success.RCV LOGOFF ; Error handling (prior carrier loss)
IF "$3" = "$maxdlmail" LOGOFF ; Counter check: dl attempts
INCR 3 ; Increment DLMAIL counter
SEND "^~^M" ; Get "command" prompt
TIMEOUT 60 LOGOFF ; Keep large
WAITFOR "ommand?"
SEND "^~D^M" ; Download .QWK packet
TIMEOUT 2000 CARRIERDROP ; Wait max 20 minutes for .QWK
WAITFOR "Prepare to download" ; Wait for file to compress
PAUSE 1000 ; Pause 1 sec (or overrun next cmd)
DOS "if exist $maildir\$mailDL del $maildir\$mailDL"
; Delete any prior non-completed Zmodem download of a .QWK file
DOS "qnsrz.bat $maildir $mailDL" ; Call transfer BAT file
IF $OFFLINE CARRIERDROP ; Error handling (carrier loss)
SEND "~~^M" ; Press any key to continue
CLRSCR ; Exit DSZ status line
EXIST $maildir\success.RCV LOGOFF ; Log off is DL successful
PAUSE 10000 ; 10 sec pause for door to cycle
GOTO DLMAIL ; Try again if unsuccessful
RETURN ; Exit mail routine
CARRIERDROP:
SCRIPT $CMDSCRIPT
LOGOFF:
SCRIPT Q-LOGOFF.SCR