home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / am120.zip / AUTOMATE.SCR < prev    next >
Text File  |  1991-02-15  |  19KB  |  872 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;; AutoMate Automated File Transfer Script for Qmodem 4.XX  ;;;
  3. ;;; By Marc S. Hedish, ABSOLUT(e)LY TEMPORARY (702) 254-8601 ;;;
  4. ;;; (C) Copyright 1991 Marc S. Hedish - All Rights Reserved  ;;;
  5. ;;; Version 1.2 - 02/15/91 - Production Release              ;;;
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. If "$0" = "AMDIAL" Start
  8. Graphics ANSI
  9. TurnOn 8_BIT
  10. TurnOff ECHO PRINT SPLIT BS_DEL LINEFEED
  11. String QWKFILE REPFILE NAME PROT DOORNUM CMDFILE CMD FILENAME UP DN FIRST
  12. String DESCRIPTION PWORD TEMP OLDATTR STATUS TRIES CONF CHECK LANG PROMPT TYPE
  13. GoTo Start
  14. GetMail:
  15. If "$TYPE" = "QMH" NA
  16. TimeOut 45 Abort
  17. Send "^M"
  18. WaitFor "$PROMPT"
  19. Delay 1000
  20. If "$TYPE" = "SF" SFG
  21. Send "OPEN $DOORNUM^M"
  22. XGetMail:
  23. TimeOut 300 Abort
  24. When "doors are" NoDoors
  25. When "<NO TRANSFER>" NoMsg
  26. When "No Messages Found..." NoMsg
  27. When "<DLASK>" "Y^M"
  28. When "<AUTOSTART>" "^[^["
  29. When "this packet" "Y^M"
  30. When "]oodbye" "Y^M"
  31. When "Type for transfer" "$PROT^M"
  32. When "Begin Your Download" Mega
  33. When "Choice - [" SFM
  34. Assign TRIES 1
  35. Loop6:
  36. WaitFor "Command"
  37. Pause 1000
  38. Send "D$PROT^M"
  39. WaitFor "$QWKFILE"
  40. Mega:
  41. Pause 1000
  42. AtWrite 61 05 031 "Attempt - $TRIES"
  43. Assign CHECK $PROT
  44. Gosub CheckProtocol
  45. Download $PROT $DN$QWKFILE
  46. If $SUCCESS Loop7
  47. WaitFor "Command"
  48. Incr TRIES
  49. If "$TRIES" > "3" FailedGetMail
  50. GoTo Loop6
  51. Loop7:
  52. When "abort automatic" SFMailDone
  53. When "MegaMail" MegaDone
  54. Send "^M"
  55. WaitFor "Command"
  56. Loop7a:
  57. Pause 1000
  58. Readfile CMD
  59. If "$CMD" = "LogOff" Log2
  60. Send "Q^M"
  61. Assign TEMP Skip
  62. MegaDone:
  63. WaitFor "$PROMPT"
  64. Return
  65. SFG:
  66. If "$CMD" = "ExchangeMail" SFG1:
  67. Send "M^M"
  68. WaitFor "$PROMPT"
  69. Delay 1000
  70. SFG1:
  71. Send "$DOORNUM^M"
  72. Assign TEMP SFM
  73. GoTo XGetMail
  74. SFMail:
  75. When "protocol:" "$PROT^M"
  76. When "return you" "Y"
  77. Delay 1000
  78. Send "1^M"
  79. WaitFor "to process:"
  80. Pause 2000
  81. Send "Q^M"
  82. WaitFor "to extract:"
  83. Pause 1000
  84. Send "N"
  85. When "you? [y/n]" "Y^M"
  86. WaitFor "Ready to send"
  87. GoTo Mega
  88. SFMailDone:
  89. When
  90. Send "A"
  91. SFMD:
  92. WaitFor "$PROMPT"
  93. GoTo Loop7a
  94. FailedGetMail:
  95. Decr TRIES
  96. AtWrite 12 06 252 "    Failed download of $QWKFILE after $TRIES attempts.    "
  97. Stamp Failed download of mail packet $QWKFILE after $TRIES attempts.
  98. Gosub Error
  99. GoTo Loop7
  100. NoDoors:
  101. AtWrite 12 06 252 "       Mail door not available at the present time.       "
  102. Stamp Mail door not available at the present time.
  103. Gosub Error
  104. Return
  105. NoMsg:
  106. Stamp No messages found to retrieve.  Unable to download $QWKFILE.
  107. GoTo Loop7
  108. CheckProtocol:
  109. If "$CHECK" = "G" Abort
  110. If "$CHECK" = "F" Abort
  111. If "$CHECK" = "Y" Abort
  112. If "$CHECK" = "O" Abort
  113. If "$CHECK" = "R" Abort
  114. If "$CHECK" = "C" Abort
  115. If "$CHECK" = "X" Abort
  116. If "$CHECK" = "A" Abort
  117. GetScr
  118. Return
  119. SendReplies:
  120. If "$TYPE" = "QMH" NA
  121. Exist $UP$REPFILE DoIt
  122. AtWrite 18 06 252 " No replies to send.  $REPFILE not found. "
  123. Stamp No replies to send.  $REPFILE not found.
  124. Gosub Error
  125. Return
  126. DoIt:
  127. TimeOut 45 Abort
  128. Send "^M"
  129. WaitFor "$PROMPT"
  130. Delay 1000
  131. If "$TYPE" = "SF" SFR
  132. Send "OPEN $DOORNUM^M"
  133. SFC:
  134. When "no DOORS are" NoDoors
  135. When "transfer now..." DjSend
  136. When "Reader Now..."  DjSend
  137. When "Sorry" CantSend
  138. When "Type for transfer" "$PROT^M"
  139. When "Choice - [" SFM
  140. Assign TRIES 1
  141. Loop8:
  142. WaitFor "Command"
  143. Pause 1000
  144. Send "U$PROT^M"
  145. WaitFor "$REPFILE"
  146. DjSend:
  147. Pause 1000
  148. AtWrite 61 05 031 "Attempt - $TRIES"
  149. Assign CHECK $PROT
  150. Gosub CheckProtocol
  151. Upload $PROT $UP$REPFILE
  152. If $SUCCESS Loop9
  153. Send "^M"
  154. Incr TRIES
  155. If "$TRIES" > "3" FailedSendReplies
  156. GoTo Loop8
  157. Loop9:
  158. If "$CMD" = "ExchangeMail" Abort
  159. If "$TEMP" = "SFM" SFMD
  160. Send "^M"
  161. WaitFor "Command"
  162. GoTo Loop7a
  163. SFR:
  164. Send "M^M"
  165. WaitFor "$PROMPT"
  166. Delay 1000
  167. Send "$DOORNUM^M"
  168. GoTo SFC
  169. SFM:
  170. If "$TEMP" = "SFM" SFMail
  171. When "protocol:" "$PROT^M"
  172. Assign TEMP SFM
  173. Delay 1000
  174. Send "2^M"
  175. WaitFor "abort!"
  176. GoTo DjSend
  177. FailedSendReplies:
  178. Decr TRIES
  179. AtWrite 12 06 252 "     Failed upload of $REPFILE after $TRIES attempts.     "
  180. Stamp Failed upload of mail packet $REPFILE after $TRIES attempts.
  181. Gosub Error
  182. Send "^M"
  183. GoTo Loop9
  184. CantSend:
  185. Stamp Unable to send replies.  Not enough available time.
  186. GoTo Loop9
  187. DeleteReplies:
  188. Exist $UP$REPFILE DelReplyPacket
  189. Return
  190. DelReplyPacket:
  191. DOS "ERASE $UP$REPFILE"
  192. Exist $UP$REPFILE RepliesNotDeleted
  193. Return
  194. RepliesNotDeleted:
  195. AtWrite 12 06 252 "            ERROR! - Could not delete replies.            "
  196. Stamp Could not delete replies - $UP$REPFILE.
  197. Gosub Error
  198. Return
  199. DeleteMail:
  200. Exist $DN$QWKFILE DelMailPacket
  201. Return
  202. DelMailPacket:
  203. DOS "ERASE $DN$QWKFILE"
  204. Exist $DN$QWKFILE MailNotDeleted
  205. Return
  206. MailNotDeleted:
  207. AtWrite 12 06 252 "          ERROR! - Could not delete mail packet.          "
  208. Stamp Could not delete mail packet - $DN$QWKFILE.
  209. Gosub Error
  210. Return
  211. ExchangeMail:
  212. Gosub SendReplies
  213. If "$TEMP" = "SFM" GetMail
  214. Exist $UP$REPFILE XGetMail
  215. GoTo GetMail
  216. GetFiles:
  217. TimeOut 45 Loop3
  218. When "] Command" ProGet
  219. When "not found" FileNotFound
  220. When "does not exist" FileNotFound
  221. When "no match." FileNotFound
  222. When "Start your download" GetEm2
  223. When "download of" GetEm2
  224. When "password for downloading?" PwdGet
  225. When "Incorrect" BadPwd
  226. Loop2:
  227. ReadFile FILENAME
  228. If "$FILENAME" = "_EOF_" AbortFile
  229. If "$FILENAME" = " " AbortFile
  230. If "$FILENAME" = "*" AbortFile
  231. AtWrite 61 05 031 "            "
  232. AtWrite 61 05 031 "$FILENAME"
  233. Assign TRIES 0
  234. Loop3:
  235. If $OFFLINE Abort
  236. Incr TRIES
  237. Send "^M"
  238. WaitFor "$PROMPT"
  239. Delay 1000
  240. If "$TYPE" = "SF" SFGet
  241. If "$TYPE" = "GAP" SFGet
  242. If "$TYPE" = "QMH" QMGet
  243. Send "D $FILENAME $PROTOCOL^M"
  244. GetEm:
  245. WaitFor "(Ctrl-X)"
  246. GetEm2:
  247. Delay 1000
  248. Assign CHECK $PROTOCOL
  249. Gosub CheckProtocol
  250. Download $PROTOCOL $DN$FILENAME
  251. If $SUCCESS Loop2
  252. Incr TRIES
  253. If "$TRIES" > "3" FailedDownload
  254. GoTo Loop3
  255. SFGet:
  256. If "$TEMP" = "Y" SFGet1
  257. Send "F"
  258. SFGet1:
  259. Send "^M"
  260. WaitFor "$PROMPT"
  261. Assign TEMP Y
  262. Delay 1000
  263. If "$TYPE" = "GAP" GAPGet
  264. When "Protocol" "$PROTOCOL^M"
  265. When "transfer now" "Y^M"
  266. When "Ready to Send" GetEm2
  267. When "not allowed here" Loop3
  268. Send "D^M"
  269. WaitFor "download:"
  270. Delay 1000
  271. Send "$FILENAME^M^M"
  272. WaitFor "$PROMPT"
  273. GoTo Loop3
  274. QMGet:
  275. Send "D^M"
  276. WaitFor "aborts > "
  277. Delay 1000
  278. Send "$PROTOCOL^M"
  279. WaitFor "ends > "
  280. Delay 1000
  281. Send "$FILENAME^M^M"
  282. WaitFor "Cancel"
  283. GoTo GetEm2
  284. GAPGet:
  285. When "(e/c)" "C^M"
  286. When "Log Off" "N^M"
  287. Send "D $FILENAME $PROTOCOL^M^M"
  288. WaitFor "Ready To Send"
  289. GoTo GetEm2
  290. ProGet:
  291. Delay 1000
  292. Send "D $PROTOCOL $FILENAME S^M"
  293. GoTo GetEm
  294. PwdGet:
  295. ReadFile DESCRIPTION
  296. If "$DESCRIPTION" = "_EOF_" Abort
  297. If "$DESCRIPTION" = " " Abort
  298. If "$DESCRIPTION" = "*" Abort
  299. Send "$DESCRIPTION^M"
  300. GoTo GetEm
  301. FailedDownload:
  302. Decr TRIES
  303. Stamp Failed download of $FILENAME after $TRIES attempts.
  304. GoTo Loop2
  305. FileNotFound:
  306. Stamp Failed download.  $FILENAME not on $BOARD.
  307. GoTo Loop2
  308. BadPwd:
  309. Stamp Failed download of $FILENAME due to incorrect password.
  310. GoTo Loop2
  311. AbortFile:
  312. If "$TEMP" <> "Y" Abort
  313. Send "^M"
  314. WaitFor "$PROMPT"
  315. Delay 1000
  316. Send "Q^M"
  317. Return
  318. SendFiles:
  319. TimeOut 45 Loop5
  320. When "] Command" ProSend
  321. When "duplicates a current board file." OnFile
  322. When "already exists" OnFile
  323. When "Sorry" NoUploads
  324. When "currently disabled" NoUploads
  325. Loop4:
  326. ReadFile FILENAME
  327. If "$FILENAME" = "_EOF_" AbortFile
  328. If "$FILENAME" = " " AbortFile
  329. If "$FILENAME" = "*" AbortFile
  330. If "$TYPE" = "QMH" SkipDesc
  331. If "$TYPE" <> "GAP" ReadDesc
  332. ReadFile CONF
  333. If "$CONF" = "_EOF_" AbortFile
  334. If "$CONF" = " " AbortFile
  335. If "$CONF" = "*" AbortFile
  336. ReadFile PWORD
  337. If "$PWORD" = "_EOF_" AbortFile
  338. If "$PWORD" = " " AbortFile
  339. If "$PWORD" = "*" AbortFile
  340. ReadDesc:
  341. ReadFile DESCRIPTION
  342. If "$DESCRIPTION" = "_EOF_" AbortFile
  343. If "$DESCRIPTION" = " " AbortFile
  344. If "$DESCRIPTION" = "*" AbortFile
  345. AtWrite 61 05 031 "            "
  346. AtWrite 61 05 031 "$FILENAME"
  347. SkipDesc:
  348. Assign TRIES 0
  349. Exist $UP$FILENAME Loop5
  350. AtWrite 12 06 252 " $FILENAME not found in upload directory. "
  351. Stamp Failed upload.  $FILENAME not found in upload directory.
  352. Gosub Error
  353. GoTo Loop4
  354. Loop5:
  355. If $OFFLINE Abort
  356. Incr TRIES
  357. Send "^M"
  358. WaitFor "$PROMPT"
  359. Delay 1000
  360. If "$TYPE" = "SF" SFSend
  361. If "$TYPE" = "GAP" SFSend
  362. If "$TYPE" = "QMH" QMSend
  363. Send "U $FILENAME $PROTOCOL^M"
  364. WaitFor "?"
  365. Delay 1000
  366. Send "$DESCRIPTION^M"
  367. Delay 1000
  368. Send "^M"
  369. SendEm:
  370. WaitFor "(Ctrl-X)"
  371. SendEm2:
  372. Delay 1000
  373. Assign CHECK $PROTOCOL
  374. Gosub CheckProtocol
  375. Upload $PROTOCOL $UP$FILENAME
  376. If $SUCCESS Loop4
  377. Incr TRIES
  378. If "$TRIES" > "3" FailedUpload
  379. GoTo Loop5
  380. SFSend:
  381. If "$TEMP" = "Y" SFSend1
  382. Send "F"
  383. SFSend1:
  384. Send "^M"
  385. WaitFor "$PROMPT"
  386. Assign TEMP Y
  387. Delay 1000
  388. If "$TYPE" = "GAP" GAPSend
  389. When "Protocol" "$PROTOCOL^M"
  390. When "transfer now" "Y^M"
  391. When "Ready to Receive" SendEm2
  392. Send "U^M"
  393. WaitFor "upload:"
  394. Delay 1000
  395. Send "$FILENAME^M"
  396. WaitFor "only!"
  397. Delay 1000
  398. Send "$DESCRIPTION^M^M"
  399. WaitFor "$PROMPT"
  400. GoTo Loop4
  401. QMSend:
  402. When "CTRL-X" SendEm2
  403. Send "U^M"
  404. WaitFor "aborts > "
  405. Delay 1000
  406. Send "$PROTOCOL^M"
  407. WaitFor "Upload > "
  408. Delay 1000
  409. Send "$FILENAME^M"
  410. WaitFor "$PROMPT"
  411. GoTo Loop4
  412. GAPSend:
  413. When "[S]ave" "S^M"
  414. When "More than 1" "N^M"
  415. Send "U $FILENAME $PROTOCOL^M"
  416. WaitFor "(y/n) : "
  417. Delay 1000
  418. Send "$PWORD^M"
  419. WaitFor "]"
  420. Delay 1000
  421. Send "$CONF^M"
  422. WaitFor "1:"
  423. Delay 1000
  424. Send "$DESCRIPTION^M"
  425. Delay 1000
  426. Send "^M"
  427. WaitFor "Ready"
  428. GoTo SendEm2
  429. ProSend:
  430. Delay 1000
  431. Send "U $PROTOCOL $FILENAME S^M"
  432. GoTo SendEm
  433. FailedUpload:
  434. Decr TRIES
  435. Stamp Failed upload of $FILENAME after $TRIES attempts.
  436. GoTo Loop4
  437. OnFile:
  438. AtWrite 12 06 252 " $FILENAME already posted on $BOARD. "
  439. Stamp Failed upload.  $FILENAME already posted on $BOARD.
  440. Gosub Error
  441. GoTo Loop4
  442. NoUploads:
  443. AtWrite 12 06 252 " Uploads are currently disabled on $BOARD. "
  444. Stamp Failed upload.  Uploads are currently disabled on $BOARD.
  445. Gosub Error
  446. GoTo Loop4
  447. JoinConference:
  448. TimeOut 30 Abort
  449. When "(Enter)=no?" "^M"
  450. ReadFile CONF
  451. If "$TYPE" = "SF" NA
  452. If "$TYPE" = "QMH" NA
  453. If "$CONF" = "_EOF_" Abort
  454. If "$CONF" = " " Abort
  455. If "$CONF" < "0" BadConf
  456. If "$CONF" > "999" BadConf
  457. AtWrite 61 05 031 "            "
  458. AtWrite 61 05 031 "$CONF"
  459. Send "^M"
  460. WaitFor "$PROMPT"
  461. Delay 1000
  462. Send "J $CONF^M"
  463. WaitFor "$PROMPT"
  464. Return
  465. BadConference:
  466. AtWrite 12 06 252 "  Error! - Conference number '$CONF' invalid.  "
  467. Stamp Error! - Confernce number '$CONF' invalid.
  468. Gosub Error
  469. Return
  470. GetBulletins:
  471. TimeOut 45 Abort
  472. When "(Enter)=no change?" "$PROTOCOL^M"
  473. ReadFile FILENAME
  474. If "$TYPE" = "SF" NA
  475. If "$TYPE" = "GAP" NA
  476. If "$TYPE" = "QMH" NA
  477. If "$FILENAME" = "_EOF_" Abort
  478. If "$FILENAME" = " " Abort
  479. AtWrite 61 05 031 "            "
  480. AtWrite 61 05 031 "$FILENAME"
  481. When "Protocol Type" BadProtocol
  482. When "not found on disk!" BltNotFound
  483. When "Start your download" GetBlt1
  484. When "(Ctrl-X) GetBlt1
  485. Assign TRIES 0
  486. If $OFFLINE Abort
  487. Incr TRIES
  488. Send "^M"
  489. WaitFor "$PROMPT"
  490. Delay 1000
  491. Send "T^M"
  492. WaitFor "=> ("
  493. Getx TEMP 1 )
  494. WaitFor "$PROMPT"
  495. Delay 1000
  496. Send "B $FILENAME D^M"
  497. GetBlt:
  498. WaitFor "(Ctrl-X)"
  499. GetBlt1:
  500. Delay 1000
  501. Assign CHECK $PROTOCOL
  502. Gosub CheckProtocol
  503. Download $PROTOCOL $DN$FILENAME
  504. If $SUCCESS GoodBulletin
  505. Incr TRIES
  506. If "$TRIES" > "3" FailedBulletin
  507. GoTo GetBlt1
  508. GoodBulletin:
  509. WaitFor "$PROMPT"
  510. If "$TEMP" = "$PROTOCOL" Abort
  511. Send "T $TEMP^M"
  512. Return
  513. FailedBulletin:
  514. Decr TRIES
  515. Stamp Failed download of bulletin $FILENAME after $TRIES attempts.
  516. Return
  517. BltNotFound:
  518. Stamp Failed bulletin download.  Bulletin $FILENAME not on $BOARD.
  519. WaitFor "$PROMPT"
  520. Delay 1000
  521. Send "^M"
  522. GoTo GoodBulletin
  523. BadProtocol:
  524. Send "^M"
  525. Decr TRIES
  526. Stamp Failed download of bulletins.  Needed BATCH protocol.
  527. GoTo GoodBulletin
  528. LogOnG:
  529. Assign TEMP Y
  530. GoTo Log1
  531. LogOn:
  532. Assign TEMP N
  533. Log1:
  534. Assign PROMPT "Command?"
  535. TimeOut 7 Begin
  536. When "# to use" "$LANG^M"
  537. When "First Name : " Log4
  538. When "Command $FIRST" NBegin
  539. When "Command > " QMBegin
  540. When "Command : " GAPBegin
  541. When "MENU - [" SFBegin
  542. WaitFor "graphics (Enter)=no?"
  543. Delay 100
  544. Begin:
  545. TimeOut 60 Abort
  546. When "Quit?" "^M"
  547. When "correct?" "Y^M"
  548. When "Password" "$PASSWORD^M"
  549. When "exit?" "^M"
  550. When "messages since" "N^M"
  551. When "[Y/N]" "N^M"
  552. When "MESSAGE SCAN" "S^M"
  553. When "to Main Menu?" "^M"
  554. Send "$TEMP Q NS^M"
  555. WaitFor "first name"
  556. Log4:
  557. Delay 1000
  558. Send "$NAME^M"
  559. When "ProDoor" Log3
  560. WaitFor "$PROMPT"
  561. Delay 1000
  562. Send "CHAT U Session Managed by AutoMate 1.2^M"
  563. Log3:
  564. WaitFor "$PROMPT"
  565. AtWrite 28 03 023 "- PCBoard "
  566. Return
  567. NBegin:
  568. Assign PROMPT "Command $FIRST"
  569. AtWrite 28 03 023 "- Modified PCB "
  570. Return
  571. QMBegin:
  572. Assign PROMPT "Command > "
  573. Assign TYPE QMH
  574. AtWrite 28 03 023 "- Qmodem Host "
  575. Return
  576. SFBegin:
  577. Assign PROMPT "MENU - ["
  578. Assign TYPE SF
  579. AtWrite 28 03 023 "- Spitfire "
  580. Return
  581. GAPBegin:
  582. Assign PROMPT "Command : "
  583. Assign TYPE GAP
  584. AtWrite 28 03 023 "- GAP "
  585. Return
  586. LogOff:
  587. TimeOut 60 Abort
  588. Send "^M"
  589. WaitFor "$PROMPT"
  590. Delay 1000
  591. Log2:
  592. Pause 1000
  593. Send "G^M"
  594. TimeOut 10 DropLine
  595. When "Proceed with logoff?" "Y^M"
  596. When "log off [Y/n]?" "Y^M"
  597. WaitFor "NO CARRIER"
  598. GoTo Done
  599. DropLine:
  600. If $OFFLINE Done
  601. HangUp
  602. GoTo DropLine
  603. Done:
  604. TurnOff Capture
  605. Assign Status "Test"
  606. Return
  607. SetType:
  608. Assign PROMPT "Command?"
  609. Assign TYPE PCB
  610. When "Command $FIRST" NBegin
  611. When "Command > " QMBegin
  612. When "Command : " GAPBegin
  613. When "MENU - [" SFBegin
  614. Send "^M"
  615. GoTo Log3
  616. SetDLPath:
  617. ReadFile TEMP
  618. If "$TEMP" = "_EOF_" Abort
  619. If "$TEMP" = " " Abort
  620. Exist $TEMP*.* GoodDN
  621. AtWrite 12 06 252 "       Invalid Download Path.  Default will be used.       "
  622. Gosub Error
  623. Return
  624. GoodDN:
  625. Assign DN $TEMP
  626. Return
  627. SetULPath:
  628. ReadFile TEMP
  629. If "$TEMP" = "_EOF_" Abort
  630. If "$TEMP" = " " Abort
  631. Exist $TEMP*.* GoodUL
  632. AtWrite 12 06 252 "        Invalid Upload Path.  Default will be used.        "
  633. Gosub Error
  634. Return
  635. GoodUL:
  636. Assign UP $TEMP
  637. Return
  638. SetMailDoor:
  639. ReadFile TEMP
  640. If "$TEMP" = "_EOF_" Abort
  641. If "$TEMP" = " " Abort
  642. If "$TEMP" < "0" BadDoor
  643. If "$TEMP" > "Z" BadDoor
  644. AtWrite 61 05 031 "            "
  645. AtWrite 61 05 031 "$TEMP"
  646. Assign DOORNUM $TEMP
  647. Return
  648. BadDoor:
  649. AtWrite 12 06 252 "        Invalid door number specified.  $DOORNUM will be used. "
  650. Gosub Error
  651. Return
  652. BeginRecording:
  653. AtWrite 12 06 031 " Recording Session to $SCPATHAUTOMATE.CAP "
  654. Capture  $SCPATHAUTOMATE.CAP
  655. Return
  656. EndRecording:
  657. TurnOff Capture
  658. AtWrite 12 06 031 "                  Session Recording Ended.                 "
  659. Return
  660. DeleteRecording:
  661. TurnOff Capture
  662. Exist $SCPATHAUTOMATE.CAP DelRecording
  663. Return
  664. DelRecording:
  665. DOS "ERASE $SCPATHAUTOMATE.CAP"
  666. Exist $SCPATHAUTOMATE.CAP RecordingNotDeleted
  667. Return
  668. RecordingNotDeleted:
  669. AtWrite 12 06 252 "           ERROR! - Could not delete recording.           "
  670. Stamp Could not delete recording - $SCPATHAUTOMATE.CAP
  671. Gosub Error
  672. Return
  673. ChangePassword:
  674. TimeOut 45 NotChanged
  675. ReadFile TEMP
  676. If "$TYPE" = "QMH" NA
  677. If "$TEMP" = "_EOF_" NotChanged
  678. If "$TEMP" = " " NotChanged
  679. Assign PWORD $TEMP
  680. When "do not match!" NotChanged
  681. If "$TYPE" = "SF" SFPword:
  682. If "$TYPE" = "GAP" GAPPword:
  683. When "? (" "^M"
  684. Send "W^M"
  685. WaitFor "Password"
  686. Delay 1000
  687. Send "$PWORD"
  688. WaitFor "Re-enter"
  689. Delay 1000
  690. Send "$PWORD"
  691. WaitFor "$PROMPT"
  692. PWDone:
  693. Stamp Password on $BOARD has been changed.
  694. Return
  695. SFPword:
  696. Send "Y^M"
  697. WaitFor "$PROMPT"
  698. Delay 1000
  699. Send "P^M"
  700. WaitFor "Password:"
  701. Delay 1000
  702. Send "$PWORD^MY"
  703. WaitFor "$PROMPT"
  704. Delay 1000
  705. Send "Q^M"
  706. GoTo PWDone
  707. GAPPword:
  708. Send "V^M"
  709. WaitFor "[H]elp : "
  710. Delay 1000
  711. Send "N^M"
  712. WaitFor "Ok?"
  713. Pause 1000
  714. Send "N^M"
  715. When "r password" "$PWORD"
  716. When " : " "^M"
  717. When "$FIRST" GAPPwordDone
  718. WaitFor "Ok?"
  719. GAPPwordDone:
  720. When
  721. WaitFor "OK?"
  722. Pause 1000
  723. Send "^M"
  724. GoTo PWDone
  725. NotChanged:
  726. AtWrite 12 06 252 "                Unable to change password.                "
  727. Stamp Error! - Unable to change password.
  728. Gosub Error
  729. WaitFor "$PROMPT"
  730. Return
  731. Abort:
  732. Return
  733. Test:
  734. Debug On
  735. Assign STATUS $CMD
  736. GoTo NextCMD
  737. Start:
  738. Assign OLDATTR $ATTR
  739. Window 01 01 $LAST_COL $LAST_ROW
  740. GetScr
  741. ClrScr
  742. Color 127
  743. Window 01 01 80 09
  744. ClrScr
  745. Color 31
  746. Box 07 02 74 07
  747. ClrScr
  748. AtWrite 29 02 030 " AutoMate Status Window "
  749. AtWrite 61 07 030 " Version 1.2 "
  750. AtWrite 09 03 023 "Current Connection"
  751. AtWrite 09 04 023 "──────────────────────────────────"
  752. AtWrite 09 05 031 "$BOARD "
  753. AtWrite 44 03 023 "Current Command"
  754. AtWrite 44 04 023 "────────────────"
  755. AtWrite 61 03 023 "Parameter"
  756. AtWrite 61 04 023 "────────────"
  757. AtWrite 75 03 007 "░░"
  758. AtWrite 75 04 007 "░░"
  759. AtWrite 75 05 007 "░░"
  760. AtWrite 75 06 007 "░░"
  761. AtWrite 75 07 007 "░░"
  762. AtWrite 09 08 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
  763. AtWrite 43 08 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
  764. Color $OLDATTR
  765. Window 01 10 $LAST_COL $LAST_ROW
  766. If "$NOTEFILE" = "" NotLinked
  767. Assign CMDFILE $NOTEFILE
  768. GoTo Linked
  769. NotLinked:
  770. If "$0" = "" NoCommands
  771. If "$0" = "AMDIAL" NoCommands
  772. Assign CMDFILE $0
  773. Linked:
  774. OpenFile $CMDFILE Read
  775. CheckFile:
  776. ReadFile CMD
  777. If "$CMD" = "AutoMate" SetUp
  778. If "$CMD" = "_EOF_" NoCommands
  779. GoTo CheckFile
  780. Setup:
  781. ReadFile NAME
  782. ReadFile QWKFILE
  783. ReadFile REPFILE
  784. ReadFile DOORNUM
  785. ReadFile PROT
  786. ReadFile LANG
  787. Assign UP $ULPATH
  788. Assign DN $DLPATH
  789. Assign FIRST $NAME
  790. Assign TYPE PCB
  791. If "$LANG" < ":" NextCMD
  792. Assign CMD "$LANG"
  793. Assign LANG ""
  794. GoTo SkipRead
  795. NextCMD:
  796. ReadFile CMD
  797. SkipRead:
  798. If "$CMD" = "_EOF_" Term
  799. If "$CMD" <= " " Term
  800. Assign TEMP ""
  801. Assign TEMP $CMD
  802. If "$TEMP" <> "$CMD" NextCMD
  803. AtWrite 44 05 031 "                "
  804. AtWrite 44 05 031 "$CMD"
  805. AtWrite 61 05 031 "            "
  806. If "$CMD" = "Test" Test
  807. If "$CMD" = "Term" Term
  808. When
  809. When "More?" "N^M"
  810. When "(NS)" "N^M"
  811. When "(S)ystem" "S^M"
  812. When "to continue" "^M"
  813. When "(Enter)=continue?" "^M"
  814. When "Time Limit Exceeded" NoTime
  815. When "(Enter)=yes?" "N^M"
  816. When "(Enter)=none" "^M"
  817. Gosub $CMD
  818. If "$TEMP" = "Skip" SkipRead
  819. If "$STATUS" = "Test" NextCMD
  820. If $OFFLINE Bomb
  821. GoTo NextCMD
  822. NoCommands:
  823. AtWrite 12 06 252 " ERROR! - No commands found in note file.  Press any key. "
  824. Stamp No commands in note file.  AutoMate aborted!
  825. If "$0" = "AMDIAL" NoCommandsCont
  826. Inkey TEMP
  827. NoCommandsCont:
  828. PutScr
  829. Assign 0 NoCommands
  830. Return
  831. Term:
  832. If "$0" = "AMDIAL" Term1
  833. AtWrite 12 06 031 "     AutoMate Complete.  Returning to Terminal Mode.      "
  834. GoTo Term2
  835. Term1:
  836. AtWrite 12 06 031 "         AutoMate Complete.  Returning to AMDial.         "
  837. Term2:
  838. Gosub Error
  839. CloseFile
  840. TurnOff Capture
  841. Color $OLDATTR
  842. Window 01 01 $LAST_COL $LAST_ROW
  843. PutScr
  844. If "$0" = "AMDIAL" AMDial
  845. Exit
  846. AMDial:
  847. Assign 0 AutoMate
  848. Return
  849. Quit:
  850. AtWrite 12 06 031 "            Leaving Qmodem.  Returning to DOS.            "
  851. Gosub Error
  852. CloseFile
  853. TurnOff Capture
  854. System Y
  855. Bomb:
  856. AtWrite 12 06 252 "      Error! - No longer online.  AutoMate aborting.      "
  857. Stamp Error! - No longer online.  AutoMate aborted.
  858. Assign STATUS BOMB
  859. GoTo Term2
  860. NoTime:
  861. AtWrite 12 06 252 "      Error! - Time limit has been exceeded on board.     "
  862. Stamp Error! - Time limit has been exceeded on board.
  863. Assign STATUS BOMB
  864. GoTo Term2
  865. NA:
  866. Stamp $CMD not available on $TYPE boards.
  867. Return
  868. Error:
  869. Pause 5000
  870. AtWrite 12 06 031 "                                                          "
  871. Return
  872.