home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / qmqmpc31.zip / PCBOARD.SCR < prev    next >
Text File  |  1989-12-28  |  11KB  |  374 lines

  1. ;---------------------------------------------------------------------
  2. ; Qmodem's Generic PCBoard ProLogon Qmail PCBud Fully Automatic Script
  3. ; Filename: PCBOARD.SCR  -  QMODEM SCRIPT FOR GENERIC PCBoard LOGONS
  4. ; Attach to Qmodem phone directory entries for proper operation.
  5. ; -> Brad Berson 12/28/89, version 3.1
  6. ;---------------------------------------------------------------------
  7. ;
  8. STRING  name updn qdir qbbs qmdn spro bord udsg
  9. ;
  10. ASSIGN  name "Brad Berson"             ; And what's YOUR name?
  11. ASSIGN  qdir "C:\COMM\QMAIL"           ; Directory for Qmail files
  12. ASSIGN  qmdn "S"                       ; (S)ystem or door number
  13. ASSIGN  udsg "Y"                       ; UD.SEG flag
  14. ASSIGN  4 0                            ; Name error counter
  15. BEEP    1000
  16. BEEP    1200
  17. BEEP    1000
  18. BEEP    1200
  19. BEEP    1000
  20. ;
  21. TIMEOUT 10 ENDD                        ; Assume PCboard if no ID
  22. ASSIGN  bord "PCBOARD"
  23. WHEN    "PCboard" ENDD                 ; Decide PCboard / ProLogon
  24. WHEN    "ProLogon" PRLG
  25. WHEN    "change? " "^~1^M"             ; For PCBoards with lang option
  26. WAITFOR "phlegm"                       ; How about boogerblobs?
  27. PRLG:
  28. ASSIGN  bord "PROLOGON"
  29. ENDD:
  30. WAITFOR "=no? "                        ; The graphics prompt
  31. TIMEOUT 60 ERRH
  32. TURNOFF MUSIC
  33. GRAPHICS ANSI
  34. WHEN
  35. ;---------------------------------------------------------------------
  36. IF      "$board" = "Sound of Music" SOM
  37. IF      "$board" = "Gateways" GATE
  38. IF      "$board" = "Innovative Computer Service" ICS
  39. IF      "$board" = "Invention Factory" INVF
  40. IF      "$board" = "High Tech" TECH
  41. IF      "$board" = "Forbin Project" FORB
  42. IF      "$board" = "Moondog" MOON
  43. IF      "$board" = "Phantasm" PHAN
  44. IF      "$board" = "ExecNet" EXEC
  45. IF      "$board" = "Running Board" RUNN
  46. IF      "$board" = "Thunder Road" THUN
  47. IF      "$board" = "Pharmstat" RX
  48. GOTO    STRT2
  49. SOM:
  50. ASSIGN  qbbs "MUSIC"
  51. ASSIGN  qmdn "2"
  52. ASSIGN  spro "Q"
  53. GOTO    STRT1
  54. GATE:
  55. ASSIGN  qbbs "GATEWAYS"
  56. ASSIGN  qmdn "5"
  57. ASSIGN  spro "Q"
  58. GOTO    STRT1
  59. INVF:
  60. ASSIGN  qbbs "INV-FAC"
  61. ASSIGN  qmdn "10"
  62. ASSIGN  spro "Q"
  63. GOTO    STRT1
  64. ICS:
  65. ASSIGN  qbbs "ICS-BBS"
  66. ASSIGN  qmdn "2"
  67. ASSIGN  spro "Q"
  68. GOTO    STRT1
  69. FORB:
  70. ASSIGN  qbbs "QMODEM"
  71. ASSIGN  qmdn "7"
  72. ASSIGN  spro "Q"
  73. GOTO    STRT1
  74. MOON:
  75. ASSIGN  qbbs "MOONDOG"
  76. ASSIGN  qmdn "9"
  77. ASSIGN  spro "Q"
  78. GOTO    STRT1
  79. PHAN:
  80. ASSIGN  qbbs "PHANTASM"
  81. ASSIGN  qmdn "3"
  82. ASSIGN  spro "Q"
  83. GOTO    STRT1
  84. EXEC:
  85. ASSIGN  qbbs "EXECNET"
  86. ASSIGN  qmdn "17"
  87. ASSIGN  spro "Q"
  88. GOTO    STRT1
  89. RUNN:
  90. ASSIGN  qbbs "NYRUN"
  91. ASSIGN  qmdn "4"
  92. ASSIGN  spro "Q"
  93. GOTO    STRT1
  94. THUN:
  95. ASSIGN  qbbs "THUNDER"
  96. ASSIGN  qmdn "4"
  97. ASSIGN  spro "Q"
  98. GOTO    STRT1
  99. RX:
  100. ASSIGN  qbbs "RXSTAT"
  101. ASSIGN  qmdn "11"
  102. ASSIGN  spro "Q"
  103. GOTO    STRT1
  104. TECH:
  105. ASSIGN  qbbs "HITECH"
  106. ASSIGN  qmdn "5"
  107. ASSIGN  spro "Q"
  108. ;---------------------------------------------------------------------
  109. STRT1:
  110. ASSIGN  updn "N"
  111. EXIST   $qdir\$qbbs.QWK REPTST         ; Test for QWK and REP files
  112. ASSIGN  updn "D"                       ; and set updn as appropriate:
  113. REPTST:                                ; Download/Upload/None/Both
  114. EXIST   $qdir\$qbbs.REP YREP           ; Wierd logic but it works...
  115. GOTO    STRT2
  116. YREP:
  117. IF      "$updn" = "D" DOBOTH
  118. ASSIGN  updn "U"
  119. GOTO    STRT2
  120. DOBOTH:
  121. ASSIGN  updn "B"
  122. ;
  123. STRT2:
  124. EXIST   $scpath\UD.SEG YSEG            ; Check for PCBUD segment file
  125. ASSIGN  udsg "N"
  126. YSEG:
  127. IF      "$updn" <> "N" STRT3           ; Rst qmdn to S if no mail xfer
  128. ASSIGN  qmdn "S"
  129. STRT3:
  130. CLRSCR
  131. NOTE
  132. NOTE    PCBOARD.SCR by Brad Berson, (C) 1988, 1989 BAB Enterprises
  133. NOTE
  134. NOTE    Connected to $number at $date $time @$speed Baud
  135. NOTE
  136. NOTE    Generic PCBoard ProLogon Startup Script for
  137. NOTE    ->$board<-
  138. NOTE    Now in $bord Operation...
  139. NOTE
  140. NOTE
  141. IF      "$bord" = "PCBOARD" PBRD
  142. ;
  143. WHEN    "not found in user" RTNM       ; Retry if name not found
  144. SEND    "Y QQ $name $password $qmdn NS^M"
  145. TIMEOUT 180 ERRH                       ;  \
  146. WAITFOR "ommand?"                      ; ProLogon speed-logon command!
  147. WHEN
  148. GOTO    TEST1
  149. ;
  150. PBRD:
  151. SEND    "Y Q N^M"                      ; 'N Q N' for no graphics
  152. WHEN    "NS)?" "^~N^M"                 ; Pass bulletin screens
  153. WHEN    "not found in user" RTNM       ; Retry if name not found
  154. GOTO    SKPR                           ; Skip retry stuff on 1st pass
  155. RTNM:
  156. IF      "$4" = "2" NUSR                ; Aft 2 name tries enter as new
  157. PAUSE   1000
  158. SEND    "R^M"                          ; (R)e-enter name
  159. SKPR:
  160. WAITFOR "rst name? "                   ; Wait for name request
  161. INCR    4
  162. SEND    "$name^M"
  163. ASSIGN  5 0                            ; Password error counter
  164. WHEN    "Wrong password" RTPW          ; Retry if hit by noise
  165. RTPW:
  166. IF      "$5" = "2" NUSR                ; To error handler aft 2 tries
  167. WAITFOR "assword"                      ; Wait for password request
  168. INCR    5                              ; num of password tries
  169. SEND    "$password^M"
  170. WHEN    "(Enter)" "N^M"                ; Pass information screens
  171. WHEN    ", More" "^~N^M"
  172. WHEN    "Conference Command?" "^~A^M"  ; Abandon conferences
  173. WHEN    "(S)ys" "^~S^M"                ; Catch ProLogon prompt
  174. TIMEOUT 180 ERRH
  175. WAITFOR "Main Board Command?"
  176. WHEN
  177. ;
  178. TEST1:
  179. IF      "$qmdn" <> "S" QWIKM           ; If QwikMail board do it first
  180. IF      "$udsg" = "Y" PCBUD            ; Else test for PCBud script
  181. BEEP    800
  182. BEEP    800                            ; Else alert op to console
  183. BEEP    800
  184. EXIT                                   ; and ret control to user
  185. ;
  186. ; QMail handler begins here...
  187. ;
  188. QWIKM:
  189. IF      "$bord" = "PROLOGON" DLCMD     ; Skip OPEN if from ProLogon
  190. PAUSE   500
  191. CLRSCR
  192. NOTE
  193. NOTE    PCBoard QMail handler now executing...
  194. NOTE
  195. ASSIGN  2 6                            ; Set 6 second countdown
  196. GOSUB   CNTD
  197. WHEN    "NS)?" "^~N^M"
  198. SEND    "OPEN $qmdn^M"                 ; Open Mail door
  199. WAITFOR "ommand?"
  200. DLCMD:
  201. IF      "$updn" = "U" MORE             ; Skip d/l if QWK present
  202. SEND    "D^M"                          ; Command to download mail
  203. TIMEOUT 1200 ERRH                      ; Qmail-2 can be real slow!
  204. WHEN    "was found"  MORE              ; Skip d/l if no mail
  205. WHEN    "no messages"  MORE
  206. WHEN    "packet" "^~Y^M"               ; Yes, download the packet
  207. WHEN    "ot enough time" MORE          ; If scan took too long
  208. WHEN    "Aborts" DLIT
  209. WAITFOR "to download"                  ; Wait for packet ready
  210. DLIT:
  211. PAUSE   1000
  212. DOWNLOAD $spro $qdir\$qbbs.QWK         ; D/L QWK file, internal prot
  213. TIMEOUT 120 ERRH
  214. SEND    "^~^M"
  215. WAITFOR "ommand?"
  216. MORE:
  217. WHEN
  218. IF      "$updn" = "D" NDEL             ; Skip u/l if no REP file
  219. SEND    "U^M"                          ; Command to upload replies
  220. WAITFOR "$qbbs.REP"
  221. PAUSE   1000
  222. UPLOAD  $spro $qdir\$qbbs.REP          ; Upload REP file
  223. WHEN    " Successful" DLREP            ; Sense to delete REP file
  224. TIMEOUT 120 ERRH
  225. SEND    "^~^M"
  226. WAITFOR "ommand?"
  227. GOTO    NDEL
  228. DLREP:
  229. DOS     "DEL $qdir\$qbbs.REP >NUL"     ; Delete REP file after u/l
  230. IF      "$updn" <> "U" NDEL            ; Also del QWK, only if it
  231. DOS     "DEL $qdir\$qbbs.QWK >NUL"     ; wasn't just downloaded now
  232. NDEL:
  233. SEND    "^M"
  234. WAITFOR "ommand?"
  235. PAUSE   1000
  236. IF      "$udsg" = "N" LOFF             ; Speed logoff from mail door
  237. WHEN    "(Dots" "^~$password^M"        ; Get past pword back to brd
  238. WHEN    "(S)ys" "^~S^M"                ; Catch ProLogon prompt
  239. SEND    "Q^M"                          ; Quit out of mail door
  240. WAITFOR "ommand?"
  241. WHEN
  242. ;
  243. ; PCBud handler begins here...
  244. ;
  245. PCBUD:
  246. PAUSE   500
  247. CLRSCR
  248. NOTE
  249. NOTE    The PCBud file UD.SEG has been detected -
  250. NOTE    PCBoard PCBud handler now executing...
  251. NOTE
  252. ASSIGN  2 6                            ; Set 6 second countdown
  253. GOSUB   CNTD
  254. EXIST   $scpath\CONFER.SCR DOCON       ; Test for conference script
  255. SCRIPT  UD.SEG
  256. DOS     "DEL $scpath\UD.BAK>NUL"
  257. DOS     "REN $scpath\UD.SEG *.BAK>NUL" ; Get rid of used script
  258. GOTO    LOFF
  259. DOCON:
  260. SCRIPT  CONFER.SCR                     ; Call conference script
  261. SCRIPT  UD.SEG                         ; Call PCBud script
  262. DOS     "DEL $scpath\UD.BAK>NUL"
  263. DOS     "REN $scpath\UD.SEG *.BAK>NUL"
  264. ;
  265. LOFF:
  266. CLRSCR
  267. NOTE
  268. NOTE            Auto Logoff now in progress -
  269. NOTE
  270. ASSIGN  2 10                           ; Set 10 second countdown
  271. GOSUB   CNTD
  272. NOTE            Auto-Logoff Completing...
  273. NOTE
  274. TIMEOUT 45 DROP
  275. WHEN    "----)" "^~^M"                 ; Get past logoff questions
  276. SEND    "G^M"
  277. WAITFOR "NO CARRIER"                   ; Are we off yet?
  278. DROP:
  279. HANGUP                                 ; Make sure we're off
  280. PAUSE   1000
  281. BEEP    800
  282. BEEP    800                            ; Alert that script is over
  283. BEEP    800
  284. IF      $online DROP
  285. EXIT
  286. ;
  287. ; "User not found" handler...
  288. ;
  289. NUSR:
  290. WHEN    "egister" "^~y^M"
  291. SEND    "^~C^M"                        ; <C>ontinue logon as new user
  292. BEEP    1000
  293. BEEP    1000
  294. BEEP    1000
  295. BEEP    1000
  296. IF      "$password" = "" QNEW          ; If directory has no password
  297. WAITFOR "ssword"                       ; just return control,
  298. SEND    "^~$password^M"                ; else give password from
  299. WAITFOR "erify"                        ; the dialing directory
  300. SEND    "^~$password^M"
  301. NOTE
  302. NOTE            Please complete new user index!
  303. NOTE
  304. BEEP    1000
  305. BEEP    1000
  306. BEEP    1000
  307. BEEP    1000
  308. QNEW:
  309. EXIT
  310. ;
  311. ; Error handler...
  312. ;
  313. ERRH:
  314. BEEP    1500
  315. BEEP    1600
  316. BEEP    1500
  317. BEEP    1600
  318. BEEP    1500
  319. BEEP    1600
  320. BEEP    1500
  321. BEEP    1600
  322. NOTE
  323. NOTE            Timeout or execution error occurred in script
  324. NOTE                             $script!
  325. NOTE                      Going to logoff routine...
  326. NOTE
  327. ASSIGN  2 10
  328. GOSUB   CNTD
  329. GOTO    LOFF
  330. ;
  331. ; Countdown/delay routine...
  332. ;
  333. CNTD:
  334. NOTE            Press [Q] to abort countdown.
  335. NOTE            Press [P] to pause countdown.
  336. WHEN
  337. WHEN    "Q" ESC
  338. WHEN    "P" PAU
  339. ASSIGN  0 $wherex
  340. ASSIGN  1 $wherey
  341. TIMEOUT 1 TMOUT
  342. TMOUT:
  343. DISPLAY '           Seconds: $2... '
  344. GOTOXY  $0 $1
  345. DECR    2
  346. IF      '$2' = '0' ZER
  347. WAITFOR "shmutzsplat"
  348. ZER:
  349. TIMEOUT 45 ERRH
  350. PAUSE   1000
  351. WHEN
  352. GOTOXY  $0 $1
  353. DISPLAY '           Script continuing...
  354. NOTE
  355. RETURN
  356. PAU:
  357. WHEN
  358. SEND    "^H"                           ; Get rid of pause char
  359. TIMEOUT 1200 CNTD                      ; Pause 20 min then countdown
  360. GOTOXY  $0 $1
  361. DISPLAY '           Countdown paused, F-keys are disabled.
  362. NOTE
  363. WAITFOR "boogerz"                      ; Type "boogerz" to resume
  364. SEND    "^H^H^H^H^H^H^H"
  365. TIMEOUT 45 ERRH
  366. RETURN
  367. ESC:
  368. SEND    "^H"                           ; Get rid of quit char
  369. GOTOXY  $0 $1
  370. DISPLAY '           Countdown terminated!
  371. NOTE
  372. EXIT
  373. ;
  374.