home *** CD-ROM | disk | FTP | other *** search
-
- ; MAIL.ASP - Automating Mail Runs to PCBoard or WILDCAT! BBSs
-
- PROC MAIN
-
- ;*********** CUSTOMIZATION SECTION *********************************
- ASSIGN S0 "x-xxx-xxx-xxxx" ;BBS phone number 1
- ASSIGN S1 "x-xxx-xxx-xxxx" ;BBS phone number 2
- ASSIGN S2 "xxxxxxxx" ;your password
- ASSIGN S3 "BBSID" ;BBS code for REPs & QWKs (NODE-ID)
- ASSIGN S4 "David Lecin" ;your FIRST and LAST name
- ASSIGN S5 "c:\rep\" ;your REP directory
- ASSIGN S6 "c:\qwk\" ;your QWK directory
- ASSIGN S7 "" ;Language Number ( "" for NONE )
- N0=0 ;Mail Door Number (PCBoard only)
- N1=0 ; N1=1 - for QMail Door
- ; N1=2 - for MarkMail Door
- ; N1=2 - for KMail Door
- ; N1=3 - for Wildcat/Tomcat
- ASSIGN S8 "N" ;TOMCAT command from Message Menu
- N2=0 ; N2=0 for internal zmodem
- ; N2=1 for external protocol
- N3=150 ;Number of times to dial BBS
- ;*********** End Customization Section *****************************
-
- ; Set Time to Dial and Set Modem Defaults
- STRING T1
- STRING T2
- INTEGER C1=1
- CLEAR 30
- ATSAY 2 3 14 "Time to Execute Script: (HH:MM) "
- ATGET 2 36 15 5 T1
- IF NULL T1
- C1=0
- ENDIF
- USERMSG " Acknowledged "
- STATMSG " Waiting till specified time to execute BBS call ... "
- WHILE NOT ZERO C1
- T2=$TIME1
- FATSAY 4 25 14 "Time Now: "
- FATSAY 4 36 15 T2
- STRCMP T1 T2 5
- IF SUCCESS
- C1 = 0
- ENDIF
- ENDWHILE
- USERMSG " Executing "
- SET MODEM MAXDIAL 1
- EMULATE ANSI
- CLEAR 15
- FATSAY 1 22 30 "Press ESCAPE twice to cancel ....."
- SET PARITY NONE
- SET DATABITS 8
- SET STOPBITS 1
- SET DUPLEX FULL
- N4=1
- CALL ONE
- ENDPROC
-
- ;Alternate Dialing the Two Nodes
- PROC ONE
- MDIAL S0 S3
- IF NOT CONNECTED
- CALL TWO
- else
- call dzl
- ENDIF
- ENDPROC
- PROC TWO
- MDIAL S1 S3
- IF NOT CONNECTED
- N4=N4+1
- IF N4 > N3
- usermsg " No Response from BBS! "
- exit
- ENDIF
- CALL ONE
- else
- call dzl
- ENDIF
- ENDPROC
-
-
- PROC DZL
-
- ;Internal Variable Manipulation
- STRING S10
- STRING S11
- STRING S12
- STRING S13
- STRING S14
- ITOA N0 S14
- STRING S15
- STRING S16
- ASSIGN S15 ".REP"
- ASSIGN S16 ".QWK"
- S9=S3
- STRCAT S9 S15
- ASSIGN S12 ".QWx"
- ASSIGN S13 ".QWy"
- S10=S6
- STRCAT S10 S3
- STRCAT S10 S12
- S11=S6
- STRCAT S11 S3
- STRCAT S11 S13
- STRCAT S5 S3
- STRCAT S5 S15
- STRCAT S6 S3
- STRCAT S6 S16
-
- ;Rename Existing QWK
- findfirst S11
- if found
- delete S11
- endif
- findfirst S10
- if found
- rename S10 S11
- endif
- findfirst S6
- if found
- rename S6 S10
- endif
-
- ;Flow Control - PCBoard or Wildcat BBS
- IF N1==1
- ELSEIF N1==2
- ELSEIF N1==3
- CALL WCAT
- ELSE
- hangup
- exit
- ENDIF
-
- ;Basic PCBoard Prompts
- WHEN 0 "more?" transmit "n^M"
- WHEN 1 "continue" transmit "^M"
- WHEN 2 "(Enter)=yes?" transmit "n^M"
-
- ;Language Prompt Response
- IF NULL S7
- ELSE
- waitfor "language" forever
- transmit S7
- transmit "^M"
- ENDIF
-
- ;PCBoard Logon, New Files Capture, and Open MailDoor
- waitfor "ics (Enter)=no? " forever
- transmit "Y;Q^M"
- waitfor "our first name? " forever
- transmit S4
- transmit "^M"
- waitfor "s will echo)? (" forever
- transmit S2
- transmit "^M"
- waitfor " Board Command? " forever
- transmit "n;s;A;ns^M" ;*A*
- waitfor " Board Command? " forever
- transmit "open "
- transmit S14
- transmit "^M"
-
- ;Upload REP Packet
- findfirst S5
- if found
- waitfor "Command?" forever
- transmit "U^M"
- waitfor S9 forever
- sendfile zmodem S5
- if success
- delete S5
- endif
- endif
-
- WAITFOR "Command?" forever
-
- ;Flow Control - Mail Door
- IF N1==1
- CALL QM
- ELSEIF N1==2
- CALL MM
- ELSE
- TRANSMIT "G^M"
- exit
- ENDIF
-
- ENDPROC
-
- ;QMail Door
- PROC QM
- transmit "D;Y;G^M"
- when 0 "Prepare to download" call DZL2
- when 2 "Command?" transmit "G^M"
- WHILE CONNECTED
- ENDWHILE
- EXIT
- ENDPROC
- PROC DZL2
- if N2==1
- DOS "xfer "
- endif
- ENDPROC
-
- ;MarkMail / KMail Doors (same prompts/replies)
- PROC MM
- transmit "D^M"
- when 2 "Do you want to" call DZL3
- when 0 "Command?" transmit "G^M"
- WHILE CONNECTED
- ENDWHILE
- EXIT
- ENDPROC
- PROC DZL3
- transmit "Y^M"
- waitfor ".QWK" forever
- if N2==1
- DOS "xfer "
- endif
- ENDPROC
-
-
- ;WILDCAT! TOMCAT! Section
- PROC WCAT
-
- ;Logon and GoTo Tomcat
- WHEN 2 "ontinue" transmit "^M"
- WAITFOR "first name" forever
- TRANSMIT "*"
- TRANSMIT S4
- TRANSMIT " "
- TRANSMIT S2
- TRANSMIT "^M"
- WAITFOR "Main Menu" forever
- TRANSMIT "M^M"
- WAITFOR "Message Menu" forever
- TRANSMIT S8
- TRANSMIT "^M"
-
- ;Upload REP
- findfirst S5
- if found
- waitfor "TOMCAT MENU" forever
- transmit "U^M"
- waitfor S9 forever
- sendfile zmodem S5
- if success
- delete S5
- endif
- endif
-
- ;Download QWK
- WAITFOR "TOMCAT MENU" forever
- transmit "D^M"
- WHEN 0 "would you like to" call TOM1
- WHEN 1 "tomcat menu" transmit "G^M"
- WHILE CONNECTED
- ENDWHILE
- EXIT
-
- ENDPROC
-
- PROC TOM1
- transmit "Y^M"
- waitfor ".QWK" forever
- if N2==1
- DOS "xfer "
- endif
- ENDPROC
-