home *** CD-ROM | disk | FTP | other *** search
/ Boldly Go Collection / version40.iso / TS / 05B / ZMAIL3.ZIP / MAIL2.ASP < prev    next >
Encoding:
Text File  |  1992-06-27  |  7.6 KB  |  338 lines

  1.  
  2. ;            MAIL2.ASP  -  For Procomm Plus Version 2.01
  3. ;
  4. ;      Calls 2 BBSs at the same time everyday for up to 9 days
  5.  
  6.  
  7. PROC MAIN
  8. ;**************** SET TIME and DAYS to DIAL the BBS******************
  9. ASSIGN S6 ""                   ;TIME to start dial in 24-hr  "HH:MM"
  10.                                ;(leave as "" for immediate execution)
  11. N3=1                           ;the NUMBER of DAYS the script should
  12.                                ;DIAL the BBSs.  MAXIMUM is 9 days.
  13.                                ;(leave as 1 for a "daily" mail run)
  14. ;********************************************************************
  15. N6=0
  16. call xmr
  17. ENDPROC
  18.  
  19. PROC XMR
  20.    N5=0
  21.    N7=0
  22.    N8=0
  23.    N9=0
  24.    N6=N6+1
  25.    if N6 > N3
  26.       usermsg "   Script Completed!!   "
  27.       quit
  28.    endif
  29.      STRING T2
  30.      INTEGER C1=1
  31.      CLEAR 30
  32.        IF NULL S6
  33.           C1=0
  34.        ENDIF
  35.      STATMSG " Waiting till specified time to execute BBS call ... "
  36.      WHILE NOT ZERO C1
  37.      T2=$TIME1
  38.      FATSAY 4 25 14 "Time Set: "
  39.      FATSAY 4 36 15 S6
  40.      FATSAY 6 25 14 "Time Now: "
  41.      FATSAY 6 36 15 T2
  42.      STRCMP S6 T2 5
  43.       IF SUCCESS
  44.          C1 = 0
  45.       ENDIF
  46.      ENDWHILE
  47.      call bbs1
  48. ENDPROC
  49.  
  50. PROC BBS1
  51. ;*********** CUSTOMIZATION SECTION for FIRST BBS**********************
  52.   ASSIGN S0 "x-xxx-xxx-xxxx"     ;BBS phone number 1
  53.   ASSIGN S1 "x-xxx-xxx-xxxx"     ;BBS phone number 2
  54.   ASSIGN S2 "xxxxxxxx"           ;your password
  55.   ASSIGN S3 "xxxxx"              ;BBS code for REPs & QWKs (NODEID)
  56.   ASSIGN S4 "David Lecin"        ;your FIRST and LAST name
  57.   ASSIGN S5 "c:\rep\"            ;your REP directory
  58.   ASSIGN S7 ""                   ;Language Number  ( ""  for NONE)
  59.   N0=0                           ;Mail Door Number (PCBoard only)
  60.   N1=0                           ; N1=1 - for QMail Door
  61.                                  ; N1=2 - for MarkMail Door
  62.                                  ; N1=2 - for Kmail Door
  63.                                  ; N1=3 - for Wildcat/Tomcat
  64.   ASSIGN S8 "N"                  ;TOMCAT command from Message Menu
  65.   N2=0                           ; N2=0 for internal zmodem
  66.                                  ; N2=1 for external protocol
  67. ;*********** End Customization Section 1 *****************************
  68. N5=1
  69. CALL TMR
  70. ENDPROC
  71.  
  72. PROC BBS2
  73. ;*********** CUSTOMIZATION SECTION for SECOND BBS*********************
  74.   ASSIGN S0 "x-xxx-xxx-xxxx"     ;BBS phone number 1
  75.   ASSIGN S1 "x-xxx-xxx-xxxx"     ;BBS phone number 2
  76.   ASSIGN S2 "xxxxxxxx"           ;your password
  77.   ASSIGN S3 "xxxxx"              ;BBS code for REPs & QWKs (NODEID)
  78.   ASSIGN S4 "David Lecin"        ;your FIRST and LAST name
  79.   ASSIGN S5 "c:\rep\"            ;your REP directory
  80.   ASSIGN S7 ""                   ;Language Number  ( ""  for NONE)
  81.   N0=0                           ;Mail Door Number (PCBoard only)
  82.   N1=0                           ; N1=1 - for QMail Door
  83.                                  ; N1=2 - for MarkMail Door
  84.                                  ; N1=2 - for Kmail Door
  85.                                  ; N1=3 - for Wildcat/Tomcat
  86.   ASSIGN S8 "N"                  ;TOMCAT command from Message Menu
  87.   N2=0                           ; N2=0 for internal zmodem
  88.                                  ; N2=1 for external protocol
  89. ;*********** End Customization Section 2 *****************************
  90. N5=2
  91. CALL TMR
  92. ENDPROC
  93.  
  94. PROC TMR
  95.    N4=1
  96.      SET MODEM MAXDIAL 1
  97.      EMULATE ANSI
  98.      CLEAR 15
  99.      FATSAY 1 22 30 "Press  ESCAPE  twice to cancel ....."
  100.      SET PARITY NONE
  101.      SET DATABITS 8
  102.      SET STOPBITS 1
  103.      SET DUPLEX FULL
  104.    CALL ONE
  105. ENDPROC
  106.  
  107. ;Alternate Dialing the Two Nodes
  108. PROC ONE
  109.      MDIAL S0 S3
  110.        IF NOT CONNECTED
  111.           CALL TWO
  112.        else
  113.           N8=N8+1
  114.           N9=N5
  115.           call dzl
  116.        ENDIF
  117.  ENDPROC
  118. PROC TWO
  119.      MDIAL S1 S3
  120.        IF NOT CONNECTED
  121.           N4=N4+1
  122.           IF N4 > 2
  123.              CALL DZR
  124.              ENDIF
  125.           CALL ONE
  126.        else
  127.           N8=N8+1
  128.           N9=N5
  129.           call dzl
  130.        ENDIF
  131.  ENDPROC
  132.  
  133. PROC DZL
  134. ;Internal Variable Manipulation
  135.   STRING S14
  136.   ITOA N0 S14
  137.   STRING S15
  138.   ASSIGN S15 ".REP"
  139.   S9=S3
  140.   STRCAT S9 S15
  141.   STRCAT S5 S3
  142.   STRCAT S5 S15
  143.  
  144. ;Flow Control - PCBoard or Wildcat BBS
  145.  IF N1==1
  146.     ELSEIF N1==2
  147.     ELSEIF N1==3
  148.       CALL WCAT
  149.   ELSE
  150.       quit
  151.   ENDIF
  152.  
  153. ;Basic PCBoard Prompts
  154.    WHEN 0 "more?" transmit "n^M"
  155.    WHEN 1 "continue" transmit "^M"
  156.    WHEN 2 "(Enter)=yes?" transmit "n^M"
  157.  
  158. ;Language Prompt Response
  159.    IF NULL S7
  160.      ELSE
  161.        waitfor "language" 180
  162.        transmit S7
  163.        transmit "^M"
  164.    ENDIF
  165.  
  166. ;PCBoard Logon and Open MailDoor
  167.    waitfor "ics (Enter)=no? " 150
  168.    transmit "Y;Q^M"
  169.    waitfor "our first name? " 60
  170.    transmit S4
  171.    transmit "^M"
  172.    waitfor "s will echo)? (" 60
  173.    transmit S2
  174.    transmit "^M"
  175.    waitfor " Board Command? " 120
  176.    transmit "open "
  177.    transmit S14
  178.    transmit "^M"
  179.  
  180. ;Upload REP Packet
  181.    findfirst S5
  182.     if found
  183.        waitfor "Command?" 300
  184.        transmit "U^M"
  185.        waitfor S9 300
  186.        sendfile zmodem S5
  187.             if success
  188.                 delete S5
  189.             endif
  190.      endif
  191.  
  192.    WAITFOR "Command?" 300
  193.  
  194. ;Flow Control - Mail Door
  195.  IF N1==1
  196.       CALL QM
  197.    ELSEIF N1==2
  198.       CALL MM
  199.    ELSE
  200.       TRANSMIT "G^M"
  201.   ENDIF
  202.  
  203. ENDPROC
  204.  
  205. ;QMail Door
  206.   PROC QM
  207.       transmit "D;Y;G^M"
  208.       when 0 "Prepare to download" call DZL2
  209.       when 2 "Command?" transmit "G^M"
  210.       WHILE CONNECTED
  211.       ENDWHILE
  212.       call dzr
  213.   ENDPROC
  214.   PROC DZL2
  215.      if N2==1
  216.          dos "xfer"
  217.       endif
  218.   ENDPROC
  219.  
  220. ; If you use an external protocol, the batch file "xfer.bat" must be
  221. ; in your PCPLUS directory.
  222.  
  223. ;MarkMail or Kmail Doors (same prompts/replies)
  224.   PROC MM
  225.       transmit "d^M"
  226.       when 2 "Do you want to" call DZL3
  227.       when 0 "Command?" transmit "G^M"
  228.       WHILE CONNECTED
  229.       ENDWHILE
  230.       call dzr
  231.   ENDPROC
  232.   PROC DZL3
  233.       transmit "Y^M"
  234.       waitfor ".QWK" 300
  235.         if N2==1
  236.            dos "xfer"
  237.          endif
  238.   ENDPROC
  239.  
  240. ;WILDCAT! TOMCAT!  Section
  241. PROC WCAT
  242. ;Logon and GoTo Tomcat
  243.   WHEN 0 "ontinue" transmit "^M"
  244.   WAITFOR "first name" 180
  245.     TRANSMIT "*"
  246.     TRANSMIT S4
  247.     TRANSMIT " "
  248.     TRANSMIT S2
  249.     TRANSMIT "^M"
  250.   WAITFOR "Main Menu" 180
  251.     TRANSMIT "M^M"
  252.   WAITFOR "Message Menu" 180
  253.     TRANSMIT S8
  254.     TRANSMIT "^M"
  255.  
  256. ;Upload REP
  257.   findfirst S5
  258.     if found
  259.        waitfor "TOMCAT MENU" 300
  260.        transmit "U^M"
  261.        waitfor S9 300
  262.        sendfile zmodem S5
  263.             if success
  264.                 delete S5
  265.             endif
  266.     endif
  267.  
  268. ;Download QWK
  269.   WAITFOR "TOMCAT MENU" 300
  270.     transmit "d^M"
  271.   WHEN 1 "would you like to receive this packet" call TOM1
  272.   WHEN 2 "tomcat menu" transmit "G^M"
  273.   WHILE CONNECTED
  274.   ENDWHILE
  275.   call dzr
  276.  
  277. ENDPROC
  278.  
  279. PROC TOM1
  280.    transmit "Y^M"
  281.    waitfor ".QWK" 360
  282.      if N2==1
  283.        dos "xfer"
  284.       endif
  285. ENDPROC
  286.  
  287. ;Rename and Move QWK to storage directory
  288. ;Make sure the BATCH file "store.bat" is in your PC+ directory!
  289.  
  290. PROC DZR
  291.  
  292.  if N9==N5
  293.   if n6==1
  294.       dos "store 1"
  295.     elseif n6==2
  296.       dos "store 2"
  297.     elseif n6==3
  298.       dos "store 3"
  299.     elseif n6==4
  300.       dos "store 4"
  301.     elseif n6==5
  302.       dos "store 5"
  303.     elseif n6==6
  304.       dos "store 6"
  305.     elseif n6==7
  306.       dos "store 7"
  307.     elseif n6==8
  308.       dos "store 8"
  309.     elseif n6==9
  310.       dos "store 9"
  311.   endif
  312.  endif
  313.  
  314.   N7=N7+1
  315.   if N7 > 100
  316.      call xmr
  317.      endif
  318.   if N8==2
  319.      call xmr
  320.      endif
  321.   if N9==2
  322.      call bbs1
  323.      endif
  324.   if N9==1
  325.      call bbs2
  326.      endif
  327.  
  328.   if N9==0
  329.      if N5==1
  330.         call bbs2
  331.      elseif N5==2
  332.         call bbs1
  333.      endif
  334.   endif
  335.  
  336. ENDPROC
  337.  
  338.