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

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;; AMDial Automated Dialing Script Qmodem 4.XX & AutoMate   ;;;
  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. Graphics ANSI
  8. TurnOn 8_BIT
  9. TurnOff ECHO PRINT SPLIT BS_DEL LINEFEED NOISE MUSIC
  10. String STATUS OLDATTR TEMP COUNT WAITTIME CALL LINE TRIES PWORD CONF NAME X DN FIRST
  11. String QWKFILE REPFILE PROT DOORNUM CMDFILE CMD FILENAME DESCRIPTION CHECK REP TYPE
  12. String STARTTIME STARTDATE NOW ENDTIME T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 LANG UP PROMPT
  13. GoTo Start
  14. ShiftUp:
  15. Assign 9 "$8"
  16. Assign 8 "$7"
  17. Assign 7 "$6"
  18. Assign 6 "$5"
  19. Assign 5 "$4"
  20. Assign 4 "$3"
  21. Assign 3 "$2"
  22. Assign 2 "$1"
  23. Assign 1 "$0"
  24. Assign 0 ""
  25. Return
  26. ShiftDown:
  27. Assign 0 "$1"
  28. Assign 1 "$2"
  29. Assign 2 "$3"
  30. Assign 3 "$4"
  31. Assign 4 "$5"
  32. Assign 5 "$6"
  33. Assign 6 "$7"
  34. Assign 7 "$8"
  35. Assign 8 "$9"
  36. Assign 9 ""
  37. Return
  38. ShiftDownT:
  39. Assign TEMP "$T0"
  40. Assign T0 "$T1"
  41. Assign T1 "$T2"
  42. Assign T2 "$T3"
  43. Assign T3 "$T4"
  44. Assign T4 "$T5"
  45. Assign T5 "$T6"
  46. Assign T6 "$T7"
  47. Assign T7 "$T8"
  48. Assign T8 "$T9"
  49. Assign T9 "$TEMP"
  50. Return
  51. Cycle:
  52. Assign TEMP "$0"
  53. Gosub ShiftDown
  54. Assign 9 "$TEMP"
  55. Gosub ShiftDownT
  56. Incr LINE
  57. If $LINE > 14 Cycle1
  58. Return
  59. Cycle1:
  60. Assign LINE 5
  61. Abort:
  62. Return
  63. Error:
  64. Delay 5000
  65. AtWrite 09 15 031 "                                                              "
  66. Return
  67. Start:
  68. Assign OLDATTR $ATTR
  69. GetScr
  70. Color 127
  71. Window 01 01 80 18
  72. ClrScr
  73. Color 031
  74. Box 07 02 74 16
  75. ClrScr
  76. AtWrite 30 02 030 " AMDial Status Window "
  77. AtWrite 61 16 030 " Version 1.2 "
  78. AtWrite 09 03 023 "Dialing Queue"
  79. AtWrite 09 04 023 "───────────────────────────"
  80. AtWrite 38 03 023 "Status"
  81. AtWrite 38 04 023 "──────────────"
  82. AtWrite 54 03 023 "Dialed"
  83. AtWrite 54 04 023 "────────"
  84. AtWrite 64 03 023 "Connected"
  85. AtWrite 64 04 023 "─────────"
  86. AtWrite 75 03 007 "░░"
  87. AtWrite 75 04 007 "░░"
  88. AtWrite 75 05 007 "░░"
  89. AtWrite 75 06 007 "░░"
  90. AtWrite 75 07 007 "░░"
  91. AtWrite 75 08 007 "░░"
  92. AtWrite 75 09 007 "░░"
  93. AtWrite 75 10 007 "░░"
  94. AtWrite 75 11 007 "░░"
  95. AtWrite 75 12 007 "░░"
  96. AtWrite 75 13 007 "░░"
  97. AtWrite 75 14 007 "░░"
  98. AtWrite 75 15 007 "░░"
  99. AtWrite 75 16 007 "░░"
  100. AtWrite 09 17 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
  101. AtWrite 43 17 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
  102. Setup:
  103. When
  104. If "$0" <> "" CheckParams
  105. Exist $SCPATHAMDIAL.DAT LoadFile
  106. AtWrite 10 15 252 "  No configuration file or passed parameters.  Nothing to do. "
  107. Stamp No configuration file.  No parameters passed.  Nothing to do.
  108. NoParams:
  109. Inkey Temp
  110. Color $OLDATTR
  111. Window 01 01 $LAST_COL $LAST_ROW
  112. Exit
  113. LoadFile:
  114. AtWrite 17 15 031 "Configuration file found.  Loading configuration."
  115. OpenFile $SCPATHAMDIAL.DAT Read
  116. Assign COUNT 0
  117. Loop1:
  118. ReadFile TEMP
  119. If "$TEMP" = "_EOF_" Close
  120. Assign $COUNT "$TEMP"
  121. Incr COUNT
  122. If "$COUNT" < 10 Loop1
  123. Close:
  124. CloseFile
  125. CheckParams:
  126. AtWrite 17 15 031 "               Verifying Parameters              "
  127. Loop5:
  128. If "$9" <> "" CheckEndTime
  129. Gosub ShiftUp
  130. GoTo Loop5
  131. CheckEndTime:
  132. Assign ENDTIME 24:00:00
  133. If "$9" < "00:00:00" ResetParams
  134. If "$9" > "23:59:59" ResetParams
  135. Assign ENDTIME $9
  136. Assign 9 ""
  137. ResetParams:
  138. If "$0" <> "" CheckWaitTime
  139. Gosub ShiftDown
  140. GoTo ResetParams
  141. CheckWaitTime:
  142. Assign WAITTIME NOW
  143. If "$0" < "00:00:00" RepCheck
  144. If "$0" > "23:59:59" RepCheck
  145. Assign WAITTIME $0
  146. Gosub ShiftDown
  147. RepCheck:
  148. If "$0" <> "Replies" PrepQueue
  149. Gosub ShiftDown
  150. Exist $ULPATH*.REP Yes
  151. GoTo NoneToSend
  152. Yes:
  153. DOS "DIR $ULPATH*.REP > $SCPATH{AMDIAL}.DIR"
  154. OpenFile $SCPATH{AMDIAL}.DIR Read
  155. ReadFile REP
  156. Loop4:
  157. ReadFile REP
  158. If "$REP" <> "" Loop4
  159. Assign COUNT 0
  160. Loop2:
  161. ReadFile REP
  162. If "$REP" < "!" CloseDir
  163. Gosub ShiftUp
  164. Assign TEMP $REP
  165. Assign 0 $TEMP.REP
  166. Incr COUNT
  167. If $COUNT < 9 Loop2
  168. CloseDir:
  169. CloseFile
  170. DOS "ERASE $SCPATH{AMDIAL}.DIR"
  171. GoTo PrepQueue
  172. NoneToSend:
  173. Gosub ShiftDown
  174. If "$0" <> "" PrepQueue
  175. AtWrite 10 15 252 "  No reply packets found in upload directory.  Nothing to do. "
  176. Stamp No reply packets found in upload directory.  Nothing to do.
  177. GoTo NoParams
  178. PrepQueue:
  179. Assign COUNT 0
  180. Loop3:
  181. Assign T$COUNT 0
  182. Incr COUNT
  183. If $COUNT < 9 Loop3
  184. ShowQueue:
  185. Window 09 05 55 15
  186. Send "ATV0^M"
  187. WaitFor "0"
  188. ClrScr
  189. DisplayLn " 1 - $0"
  190. DisplayLn " 2 - $1"
  191. DisplayLn " 3 - $2"
  192. DisplayLn " 4 - $3"
  193. DisplayLn " 5 - $4"
  194. DisplayLn " 6 - $5"
  195. DisplayLn " 7 - $6"
  196. DisplayLn " 8 - $7"
  197. DisplayLn " 9 - $8"
  198. Display "10 - $9"
  199. Queue:
  200. Window 38 05 46 16
  201. GoToXY 01 01
  202. If "$0" = "" Wait
  203. DisplayLn "In Queue"
  204. If "$1" = "" Wait
  205. DisplayLn "In Queue"
  206. If "$2" = "" Wait
  207. DisplayLn "In Queue"
  208. If "$3" = "" Wait
  209. DisplayLn "In Queue"
  210. If "$4" = "" Wait
  211. DisplayLn "In Queue"
  212. If "$5" = "" Wait
  213. DisplayLn "In Queue"
  214. If "$6" = "" Wait
  215. DisplayLn "In Queue"
  216. If "$7" = "" Wait
  217. DisplayLn "In Queue"
  218. If "$8" = "" Wait
  219. DisplayLn "In Queue"
  220. If "$9" = "" Wait
  221. Display "In Queue"
  222. Wait:
  223. Assign LINE 5
  224. If "$WAITTIME" = "NOW" Go
  225. Window 18 14 63 15
  226. WaitUntil $WAITTIME
  227. Assign WAITTIME NOW
  228. ClrScr
  229. Go:
  230. Color $OLDATTR
  231. Window 01 17 $LAST_COL $LAST_ROW
  232. Assign StartDate $DATE
  233. Assign StartTime $TIME
  234. Loop8:
  235. AtWrite 13 $LINE 159 "√"
  236. Incr T0
  237. If $T0 > 200 AbortDial
  238. Assign Now $TIME
  239. If $StartTime <= $EndTime Loop6
  240. If $Date = $StartDate Loop7
  241. Assign StartTime 00:00:00
  242. Loop6:
  243. If $Now >= $EndTime AbortTime
  244. Loop7:
  245. AtWrite 38 $LINE 031 "Attempts - $T0  "
  246. AtWrite 54 $LINE 031 "$TIME"
  247. Assign X $TIME
  248. Dial "T$0"
  249. If "$X" = "$TIME" NoSuchNumber
  250. If $OFFLINE DialNext
  251. AtWrite 14 $LINE 031 "$BOARD"
  252. AtWrite 36 $LINE 031 "  Connect       "
  253. AtWrite 64 $LINE 031 "$TIME"
  254. Stamp Connected after $T0 attempts.
  255. Assign STATUS AMDIAL
  256. Assign 0 $STATUS
  257. Script AutoMate
  258. If "$STATUS" = "BOMB" BadReturn
  259. If "$0" = "AutoMate" GoodReturn
  260. AtWrite 38 $LINE 016 "$0"
  261. AtWrite 12 15 252 "              Error while returning from AutoMate.            "
  262. Gosub Error
  263. Assign 0 ""
  264. DialNext:
  265. AtWrite 13 $LINE 031 " "
  266. If "$0$1$2$3$4$5$6$7$8$9" = "" Done
  267. Loop9:
  268. Gosub Cycle
  269. If "$0" = "" Loop9
  270. GoTo Loop8
  271. BadReturn:
  272. AtWrite 38 $LINE 031 "Offline Error "
  273. Assign 0 ""
  274. GoTo DialNext
  275. GoodReturn:
  276. AtWrite 38 $LINE 031 "Completed     "
  277. Assign 0 ""
  278. GoTo DialNext
  279. Done:
  280. AtWrite 12 15 031 "              Dialing complete.  Returning to DOS.            "
  281. Delay 5000
  282. TimeOut 5 Done1
  283. Done1:
  284. Send "ATV1^M"
  285. WaitFor "OK"
  286. System Y
  287. NoSuchNumber:
  288. AtWrite 38 $LINE 016 "No Connection "
  289. AtWrite 12 15 252 " Error - Unable to connect with $0. "
  290. Stamp Error - Unable to connect with $0.
  291. Gosub Error
  292. Assign 0 ""
  293. GoTo DialNext
  294. AbortDial:
  295. AtWrite 38 $LINE 016 "Too Many Tries"
  296. AtWrite 12 15 252 " Error - Too many retires with $0. "
  297. Stamp Error - Too many retries with $0.
  298. Gosub Error
  299. Assign 0 ""
  300. GoTo DialNext
  301. AbortTime:
  302. AtWrite 12 15 031 "         Dialing time has expired.  Returning to DOS.         "
  303. Stamp Dialing halted.  Dialing time has expired.
  304. Delay 5000
  305. TimeOut 5 Done1
  306. Done1:
  307. Send "ATV1^M"
  308. WaitFor "OK"
  309. System Y
  310.