; ---------- Variables ---------- ; ; S0 - Qwikmail Transfer Switch ; S1 - File Transfer Switch ; S2 - Files Line 1 ; S3 - Files Line 2 ; S4 - Files Line 3 ; S5 - Auto Logoff Switch ; S6 - ASP File To Chain : S9 - Toggle Bulletins Switch ; ; Directories: c:\pcp - Procomm Plus directory ; c:\ez - EZ-Reader or Qmail directory ; c:\ez\bak - Backup directory for REP and QWK files ; ; Search below and replace by your directory names. ; MAIN: ; Isfile "c:\pcp\PDQ.LOG" ; Check for Log file from previous Run ; If Success ; Dos "del c:\pcp\PDQ.LOG" ; Delete previous Log file ; Endif ; Log open "c:\pcp\PDQ.LOG" ; Open new Log file Switch s0 : Mail Transfer Case "N" Switch s9 : Toggle Bulletins Case "Y" Gosub QMAIL Endcase EndSwitch Endcase Default Gosub QMAIL Endcase Endswitch Switch s1 ; File Transfer Case "Y" Gosub FILES Endcase Endswitch Switch s5 ; Auto Logoff Case "Y" Waitfor "NO CARRIER" 60 Hangup Endcase Endswitch ; Log close Exit ;----------------------------- SUBROUTINES ----------------------------- QMAIL: Atsay 22 1 31 "Opening MarkMail Door..." Locate 23 36 Transmit "open 10^M" Waitfor "Command? " Switch s9 ; Toggle Bulletins Case "Y" Transmit "C^M" Waitfor "Return: " Transmit "2^M" Waitfor "Return: " Transmit "^M" Waitfor "Command? " Endcase Endswitch Switch s0 ; Reply Transfer Case "N" Endcase Default Isfile "c:\ez\inv-fac.rep" ; check for rep to upload If Success Transmit "U^M" Dos "copy c:\ez\inv-fac.rep c:\ez\bak" ; keep backup latest rep Dos "c:\pcp\zmodem-u c:\ez\inv-fac.rep" ; upload replies Waitfor "Command?" Dos "del c:\ez\inv-fac.rep" ; delete uploaded rep Endif EndCase EndSwitch Switch s0 ; Mail Transfer Case "Y" Transmit "D^M" Waitfor "Done? " 300 If Waitfor Transmit "Y^M" Dos "copy c:\ez\inv-fac.qwk c:\ez\bak" ; keep backup of latest qwk Waitfor "INV-FAC.QWK" 300 Dos "c:\pcp\zmodem-d c:\ez" ; download mail Pause 1 Transmit "^M" Waitfor "Command?" Endif Endcase Endswitch Switch s9 ; Toggle Bulletins Case "Y" Transmit "C^M" Waitfor "Return: " Transmit "2^M" Waitfor "Return: " Transmit "^M" Waitfor "Command? " Endcase Endswitch Switch s1 ; File Transfer Case "Y" Transmit "Q^M" Waitfor "Command?" Endcase Case "N" Switch s5 ; Auto Logoff Case "N" Transmit "Q^M" Endcase Case "Y" Init n1 10 Gosub AUTO Endcase Endswitch Endcase Endswitch Return ;--------------------------------------------------------------------- AUTO: Fatsay 22 0 31 "Logging Off After %u Seconds - ESC to Abort... " n1 Pause 1 Dec n1 If Not Zero n1 Goto AUTO Endif Transmit "G^M" Return ;---------------------------------------------------------------------- FILES: Atsay 22 1 31 "Opening ProDoor File Transfer Door..." Locate 23 36 Transmit "OPEN 7^M" Cwhen When "continue: " "^M" Waitfor "Command? " Transmit "d " Switch s2 Case _null Goto FILES1 Endcase Transmit s2 Transmit "^M" Waitfor ": " ; Filespec FILES1: Switch s3 Case _null Goto FILES2 Endcase Endswitch Transmit s3 Transmit "^M" Waitfor ": " ; Filespec FILES2: Switch s4 Case _null Goto NOFILES Endcase Endswitch Transmit s4 Transmit "^M" Waitfor ": " ; Filespec NOFILES: Transmit "^M" Waitfor "(A)bort? " Pause 1 Switch s5 ; Auto Logoff Case "Y" Transmit "G^M" Dos "c:\pcp\zmodem-d" ; your zmodem download batch file Endcase Case "N" Transmit "^M" Dos "c:\pcp\zmodem-d" ; your zmodem download batch file Waitfor "Command?" Transmit "QUIT^M" Endcase Endswitch Return