home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / hpbqmqm.zip / HPBQMQM.SCR
Text File  |  1991-01-09  |  5KB  |  110 lines

  1. ;DOWNLOAD SCRIPT for QMODEM, PCB14.5, and QMAIL4 by Bob Jacobson
  2. ;               (inspired by Joe Sheppard and Nancy Hattaway)
  3.  
  4. ;  PLEASE NOTE - The script will not function properly unless the 
  5. ;  following instructions and settings are followed!
  6.  
  7. ;"Extended prompts" (Option 11) must be turned ON in the Qmail Door
  8. ;"1 Second Delay"   (Option   ) must be turned ON in the Qmail Door
  9. ;"Repeat Scanning"  (Option   ) must be turned ON in the Qmail Door
  10. ; AND Expert Mode (enter X, return) must be selected.
  11.  
  12. ;Uses the following Qmodem script variable, which must be set in your
  13. ;QMODEM.FON file:    $PASSWORD 
  14.  
  15. ;If you are using this script from the ALT-F command and do not wish
  16. ;to Exit Qmodem after the transfer, then delete the two "System Y"
  17. ;commands
  18.  
  19. ;If you intend to use this script as a "linked" script to the dialing
  20. ;entry in Qmodem, then delete the "Send     "ATH0M0^M" line and delete
  21. ;the Dial  line as well.
  22.  
  23. String   BBSID FON SIGNON CAPATH PROT MAIL_PATH CONF ; don't change these
  24.  
  25. ;Six board/user specific variables must also be assigned:
  26.  
  27. Assign   SIGNON     "Bob Jacobson"         ;Your Users Name on the BBS
  28. Assign   BBSID       HPB                   ;BBS Qmail Door ID w/out Extension
  29. Assign   FON        "29"                   ;Fill in the Qmodem Dir # of the BBS
  30. Assign   CAPATH      C:\qmodem\            ;Session Log capture file path
  31. Assign   PROT        Z                     ;One letter transfer protocol type
  32. Assign   MAIL_PATH  "D:\PROD\"   ;Your path to the QWKS and REPS with trailing \
  33. Assign   CONF       "0"                    ;Conference number to open Door from
  34.  
  35. TimeOut  300  HALT                         ;5 minutes - do HALT on timeout
  36. Send     "ATH0M0^M"                        ;make sure modem is off-hook & silent
  37.  
  38.  
  39. ;When <first expression> is true, do <second expression>
  40.  
  41. When     "nter)=yes?"    "n^M"          ;one form of this
  42. When     "ENTER = (Y)es?" "n^M"         ;another form of the same
  43. When     "no change?"     "^M"          ;when Enter = no change
  44. When     "to continue?"   "^M"          ;Press Enter to continue
  45. When     "More?"          "n^M"         ;typically, (H)elp, More?
  46. When     "messages since" "n^M"         ;don't check for messages
  47. When     "=no?"           "^~n q ns^M"  ;no graphics, skip welcome, non-stop
  48. When     "continue)?"     "N^M"         ;Press Enter to continue
  49. When     "white"          "^~n Q NS^M"  ;another no graphics form
  50.  
  51. CALLOUT:
  52. Capture  $CAPATH$BBSID.CAP              ;open capture file
  53. Dial     "$FON"                         ;call the BBS
  54.  
  55. Waitfor  "name?"                       
  56. Send     "$SIGNON $PASSWORD^M"          ;log on with name and password
  57. Waitfor  "Command"
  58. Send     "J $CONF^M"                    ;join proper conference
  59. Waitfor  "Command"
  60. Delay     500
  61. Send     "QMAIL4^M"                     ;Open Qmail Door - Change if needed
  62.  
  63. When                                    ;clear previous When statements
  64.  
  65. Exist    $MAIL_PATH$BBSID.rep UL_SESS   ;upload .rep only if it exists
  66. Goto      DL_SESS                       ;otherwise go to download routine
  67.  
  68. UL_SESS:                                ;Upload Routine
  69. Waitfor   "<COMMAND>"
  70. Send      "U^M"
  71. Waitfor   "<UPLOAD>"
  72. Delay      500
  73. Upload    $PROT $MAIL_PATH$BBSID.rep     ;upload .REP file
  74. When      "<MESSAGES INSERTED>"  DL_SESS ;If successful, delete and backup rep
  75. Goto       UL_SESS                       ;If not successful, repeat upload
  76.  
  77. DL_SESS:
  78. Waitfor   "<COMMAND>"
  79. Send      "D;Y^M"                        ;Download Session Start
  80.  
  81. DL_CYCLE:                                ;Cycling through download
  82. When      "<NO TRANSFER>"  GOODBYE
  83. Waitfor   "<DOWNLOAD>"
  84. Delay      1000
  85. Download  $PROT $MAIL_PATH               ;download .QWK files
  86. When      "<REPEAT>" DL_CYCLE            ;if multiple QWK's download the rest
  87.  
  88. GOODBYE:
  89. Waitfor   "<COMMAND>"
  90. Send      "G^M"                          ;log off
  91. Turnoff Capture 
  92. Waitfor   "NO CARRIER"
  93. Hangup
  94. Gosub     CLEANUP_REP                    ;delete and back up rep files
  95. System   Y                               ;Exit QModem and go to Dos
  96. Exit
  97.  
  98. CLEANUP_REP:                                    
  99. DOS       "del $MAIL_PATH$BBSID.bak"             ;delete old .BAK
  100. DOS       "ren $MAIL_PATH$BBSID.rep $BBSID.bak"  ;rename file after u/l
  101. Return
  102.  
  103. HALT:                                    ;if unsuccessful, halt script
  104. Note     Unsuccessful attempt
  105. Note     Script halted
  106. Turnoff  Capture
  107. Hangup
  108. System   Y                               ;exit Qmodem and go to Dos
  109. Exit                                     
  110.