home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / COMM / ZMAIL3.ZIP / MAIL3.ASP < prev    next >
Text File  |  1992-06-27  |  9KB  |  375 lines

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