home *** CD-ROM | disk | FTP | other *** search
/ Boldly Go Collection / version40.iso / TS / 05B / PCFASDOC.ZIP / FDOC20.ASP next >
Encoding:
Text File  |  1991-10-24  |  13.8 KB  |  322 lines

  1. CLEAR              ; Clear the screen for opening message
  2. LOCATE 4 0
  3. MESSAGE "╔═══════════════════════════════════════════════════════════╗"
  4. MESSAGE "║                                                           ║"
  5. MESSAGE "║            This is the FASTDOC Aspect Script.             ║"
  6. MESSAGE "║                                                           ║"
  7. MESSAGE "║ It will send one or more messages (and delete messages)   ║"
  8. MESSAGE "║ to a forum of your choice.  The messages should be in a   ║"
  9. MESSAGE "║ file on disk prepared according to the instructions in    ║"
  10. MESSAGE "║ FAST.DOC.                                                 ║"
  11. MESSAGE "║                                                           ║"
  12. MESSAGE "║ If the file is not in the current directory, precede the  ║"
  13. MESSAGE "║ filename with the drive and path.                         ║"
  14. MESSAGE "║                                                           ║"
  15. MESSAGE "║ To proceed, wait 5 seconds.                               ║"
  16. MESSAGE "║                                                           ║"
  17. MESSAGE "║ To stop this command file, hit the ESC key at any time.   ║"
  18. MESSAGE "║                                                           ║"
  19. MESSAGE "║                                                           ║"
  20. MESSAGE "╚═══════════════════════════════════════════════════════════╝"
  21. PAUSE 5            ; Wait 5 seconds before moving on
  22.  
  23. EMULATE ANSI       ; Emulate ANSI terminal 
  24. SET ATIME 1        ; When this file sounds a beep, do it for only
  25.                    ; 1 second at a time
  26. ASSIGN S0 "1"      ; Use S0 to keep track of loops--set counter at 1. 
  27.  
  28. CLEAR              ; Clear the screen 
  29. LOOP_0:            ; Return here to include first instruction box
  30. MESSAGE "    ┌──────────────────────────────────────────────┐"
  31. MESSAGE "    │ You may select up to 3 forums, one at a time.│"
  32. MESSAGE "    └──────────────────────────────────────────────┘"
  33.  
  34. LOOP_1:      ; Come back here for 2d and 3d rounds
  35.  
  36. MESSAGE "  "
  37. MESSAGE "  "
  38. MESSAGE "     ╔════════════════════════════════════════════╗"
  39. MESSAGE "     ║                                            ║"
  40. MESSAGE "     ║  1. Practice        6. IBMBBS              ║"
  41. MESSAGE "     ║  2. DSTORM          7. LOTUS A             ║"
  42. MESSAGE "     ║  3. IBMNEW          8. WPSG                ║"
  43. MESSAGE "     ║  4. IBMCOM          9. RPGAMES             ║"
  44. MESSAGE "     ║  5. IBMAPP          0. None of the above   ║"
  45. MESSAGE "     ║                                            ║"
  46. MESSAGE "     ╠════════════════════════════════════════════╣"
  47. MESSAGE "     ║                                            ║"
  48. MESSAGE "     ║ Enter the # of the forum to which          ║"
  49. MESSAGE "     ║ you wish to send a message:                ║"
  50. MESSAGE "     ║ Then press ENTER                           ║"
  51. MESSAGE "     ╚════════════════════════════════════════════╝"
  52.  
  53. FIND S0 "1"        ; See what the counter is at
  54.   IF FOUND         ; If counter is still at 1, 
  55.     MESSAGE "  "   ; Then display this message:
  56.     MESSAGE "         ┌─────────────────────────────┐"
  57.     MESSAGE "         │ This is your first choice.  │"
  58.     MESSAGE "         └─────────────────────────────┘"
  59.   ELSE             ; Otherwise, look again at the counter
  60.     FIND S0 "2"    ; Is it at 2?
  61.       IF FOUND     ; If so, then display this message:
  62.         MESSAGE "  "
  63.         MESSAGE "     ┌────────────────────────────────────────────┐"
  64.         MESSAGE "     │        This is your second choice.         │"
  65.         MESSAGE "     │                                            │"
  66.         MESSAGE "     │To proceed with the choices already made,   │"
  67.         MESSAGE "     │press ENTER without first pressing a number.│"
  68.         MESSAGE "     └────────────────────────────────────────────┘"
  69.       ELSE         ; Otherwise, display this message:
  70.         MESSAGE "  "
  71.         MESSAGE "     ┌────────────────────────────────────────────┐"
  72.         MESSAGE "     │        This is your third choice.          │"
  73.         MESSAGE "     │                                            │"
  74.         MESSAGE "     │To proceed with the choices already made,   │"
  75.         MESSAGE "     │press ENTER without first pressing a number.│"
  76.         MESSAGE "     └────────────────────────────────────────────┘"
  77.       ENDIF 
  78.   ENDIF
  79. FIND S0 "1"        ; See if the counter is still at 1
  80.   IF FOUND         ; If so, allow 3 extra lines (first instruction box)
  81.     LOCATE 16 35   ; Position cursor at end of forum query line 
  82.   ELSE             ; Otherwise, 
  83.     LOCATE 13 35   ; Put cursor here
  84.   ENDIF
  85. GET S1 1           ; Get the number of target forum from user input 
  86.                    ; Beep if more than 1 character is entered 
  87. SWITCH S1          ; Switch on choice 
  88.  
  89.   CASE "1"              ;chose # 1 
  90.     ASSIGN S2 "PRACTICE";assign to string 2 forum # 1 
  91.   ENDCASE 
  92.  
  93.   CASE "2"              ;chose # 2 
  94.     ASSIGN S2 "DSTORM"  ;assign to string 2 forum # 2 
  95.   ENDCASE 
  96.  
  97.   CASE "3"              ;chose # 3 
  98.     ASSIGN S2 "IBMNEW"  ;assign to string 2 forum # 3 
  99.   ENDCASE 
  100.  
  101.   CASE "4"              ;chose # 4 
  102.     ASSIGN S2 "IBMCOM"  ;assign to string 2 forum # 4 
  103.   ENDCASE 
  104.  
  105.   CASE "5"              ;chose # 5 
  106.     ASSIGN S2 "IBMAPP"  ;assign to string 2 forum # 5 
  107.   ENDCASE 
  108.  
  109.   CASE "6"              ;chose # 6 
  110.     ASSIGN S2 "IBMBBS"  ;assign to string 2 forum # 6 
  111.   ENDCASE 
  112.  
  113.   CASE "7"              ;chose # 7 
  114.     ASSIGN S2 "LOTUSA"  ;assign to string 2 forum # 7 
  115.   ENDCASE 
  116.  
  117.   CASE "8"              ;chose # 8 
  118.     ASSIGN S2 "WPSG"    ;assign to string 2 forum # 8 
  119.   ENDCASE 
  120.  
  121.   CASE "9"              ;chose # 9 
  122.     ASSIGN S2 "RPGAMES"  ;assign to string 2 forum # 9
  123.   ENDCASE 
  124.  
  125.   CASE "0"              ;chose # 0 
  126.     CLEAR
  127.     LOCATE 12 5
  128.     MESSAGE "You may type the name of a forum not shown above:"
  129.     LOCATE 14 5
  130.     MESSAGE "Then press ENTER."
  131.     LOCATE 12 56
  132.     GET S2
  133.   ENDCASE 
  134.  
  135.   CASE "_NULL"     ; If user hits only <CR> 
  136.     GOTO DO_IT     ; Execute the file with the choices made 
  137.   ENDCASE 
  138.  
  139.   DEFAULT          ; If user selects something not on menu
  140.     ALARM 1        ; Beep to get attention
  141.     CLEAR          ; Clear the screen
  142.     LOCATE 12, 29  ; Put cursor in middle of blank screen
  143.     MESSAGE "Not a valid selection. " 
  144.     LOCATE 14 35
  145.     MESSAGE "Try again."
  146.     PAUSE 2        ; Wait 2 seconds before proceeding
  147.     CLEAR          ; Clear the screen before returning to menu
  148.     FIND S0 "1"    ; See if counter still set at 1
  149.       IF FOUND     ; If so, must be first go-round
  150.         GOTO LOOP_0; Include the first instruction box
  151.       ELSE         ; If counter set at 2 or 3
  152.         GOTO LOOP_1; Return to menu (skip first instruction box)
  153.       ENDIF
  154.   ENDCASE 
  155.  
  156. ENDSWITCH 
  157.  
  158. CLEAR
  159. LOOP_2:            ; Get the file name (and path)
  160. MESSAGE "  "       
  161. MESSAGE "  " 
  162. MESSAGE "  ╔════════════════════════════════════════════════════════╗"
  163. MESSAGE "  ║                                                        ║"
  164. MESSAGE "  ║ What is the name of the file on disk that has the      ║"
  165. MESSAGE "  ║                                                        ║"
  166. MESSAGE "  ║ message(s)?                                            ║"
  167. MESSAGE "  ║                                                        ║"
  168. MESSAGE "  ╚════════════════════════════════════════════════════════╝"
  169. MESSAGE " "
  170. MESSAGE " "
  171. LOCATE 6 16        ; Position cursor at end of filename query
  172. GET S3             ; Get name of file to send from user input
  173. ISFILE S3          ; Test to see if that file exists
  174.   IF NOT SUCCESS   ; If that file is not on disk, then
  175.     GOTO ERROR_1   ; Jump to error message to giv'em another chance
  176.   ENDIF
  177. CLEAR
  178.  
  179. FIND S0 "1"        ; See if counter still set at 1
  180.   IF FOUND         ; If it is,
  181.     GOTO ROUND_1   ; Jump to this label
  182.   ENDIF 
  183.  
  184. FIND S0 "2"        ; See if counter set is at 2
  185.   IF FOUND         ; If it is,
  186.     GOTO ROUND_2   ; Jump to this label
  187.   ENDIF 
  188.  
  189. FIND S0 "3"        ; See if counter is set at 3
  190.   IF FOUND         ; If it is,
  191.     GOTO ROUND_3   ; Jump to this label
  192.   ENDIF 
  193.  
  194.                    ; Storing the forum selections contained in S2 and
  195.                    ; the filename selections contained in S3 in new 
  196.                    ; variables allows S2 and S3 to be re-used
  197. ROUND_1:           ; Label for this go-round
  198. ASSIGN S4 S2       ; Store first forum selection in S4
  199. ASSIGN S5 S3       ; Store first filename selection in S5
  200. ASSIGN S0 "2"      ; Set the counter at 2
  201.   GOTO LOOP_1      ; Return to menu for second go-round
  202.  
  203. ROUND_2: 
  204. ASSIGN S6 S2       ; Store second forum selection in S6 
  205. ASSIGN S7 S3       ; Store second filename selection in S7
  206. ASSIGN S0 "3"      ; Set the counter at 3
  207.   GOTO LOOP_1      ; Return to menu for last go-round
  208.  
  209. ROUND_3: 
  210. ASSIGN S8 S2       ; Store third forum selection in S8
  211. ASSIGN S9 S3       ; Store third filename selection in S9
  212. ASSIGN S0 "4"     ; Set the counter at 4 
  213.                    ; N.B. the third time is the last time
  214. DO_IT:             ; The label for when user is done with selections
  215. CLEAR              ; Clear the screen 
  216.  
  217. FIND S0 "1"        ; See if counter still set at 1
  218.   IF FOUND         ; If so, then no forum was selected
  219.                    ; User must have hit <CR> with no entry from menu
  220.   MESSAGE "  ^M^J NO SELECTION MADE. COMMAND FILE TERMINATED."
  221.   EXIT             ; End command file
  222.   ENDIF
  223.  
  224. IF NOT LINKED      ; If this command file called by dialing from 
  225.                    ; the dialing directory, then skip the dial command
  226.    DIAL "#"        ; Dial directory entry for CIS 
  227.                    ; **REPLACE NUMBER WITH CORRECT NUMBER FROM** 
  228.                    ; ** YOUR DIALING DIRECTORY** 
  229. ENDIF 
  230. IF CONNECTED       ; See if connected, and if so, do this 
  231.    TRANSMIT "^C"   ; Transmit Ctrl-C to ask for CompuServe  
  232.    WAITFOR "User ID:"  ; Wait for "User ID:" to come in COM port 
  233.    TRANSMIT "####,###^M"   ; Send user ID <CR>  
  234.                    ; ** REPLACE WITH **
  235.                    ; ** YOUR NUMBER** 
  236.                    ; Note that the ^M is the symbol PCPLUS uses  
  237.                    ; for <CR> and is not part of the user ID. 
  238.    WAITFOR "Password:"         ; Wait for this to come in COM port 
  239.    TRANSMIT "PPPPPPPPPP^M"   ; Send password and <CR> 
  240.                    ; ** REPLACE WITH  ** 
  241.                    ; ** YOUR PASSWORD ** 
  242.                    ; Note that the ^M is the symbol PCPLUS uses 
  243.                    ; for <CR> and is not part of the password. 
  244.    ALARM           ; Sound alarm to let you know log-on completed 
  245. ELSE 
  246.    MESSAGE "^M^J  Did not connect--Try again."
  247.    MESSAGE "^M^J  Command file terminated."
  248.    EXIT 
  249. ENDIF 
  250. WAITFOR "!"       ; Wait for the prompt. 
  251.                    ; Note that ! tells ProComm you want an 
  252.                    ; exclamation mark and not a <CR>  
  253. TRANSMIT "GO "     ; Start to tell CIS to go to target forum 
  254. TRANSMIT S4        ; Now tell CIS the first target forum name 
  255. TRANSMIT "^M"       ; Now send a carriage return 
  256. WAITFOR "<CR> !"  ; Wait for the prompt 
  257. SET SOFTFLOW ON    ; Set the terminal for xon/xoff flow control
  258.                    ; to keep from choking the CIS computer
  259. SENDFILE ASCII S5  ; Send the first file you picked 
  260. ALARM 1            ; Beep for 1 second to signal that messages sent 
  261. WAITFOR "!"       ; Wait for the prompt. 
  262. FIND S0 "2"        ; See if counter still set at 2
  263.   IF FOUND         ; If so, then no more forums selected
  264.     MESSAGE "^M^J NO MORE FORUMS SELECTED. COMMAND FILE TERMINATED."
  265.     EXIT           ; End command file
  266.   ENDIF
  267.  
  268. TRANSMIT "GO "     ; Start to tell CIS to go to a forum 
  269. TRANSMIT S6        ; Now tell CIS the second target forum name 
  270. TRANSMIT "^M"       ; Now send a carriage return 
  271. WAITFOR "<CR> !"  ; Wait for the prompt 
  272. SENDFILE ASCII S7  ; Send the second file you picked 
  273. ALARM 1            ; Beep for 1 second to signal that messages sent 
  274. WAITFOR "!"       ; Wait for the prompt. 
  275. FIND S0 "3"        ; See if counter still at 3
  276.   IF FOUND         ; If so, then no more forums selected
  277.     MESSAGE "^M^J THIS WAS SECOND AND LAST FORUM SELECTED."
  278.     MESSAGE "^M^J        COMMAND FILE TERMINATED."
  279.     EXIT           ; End command file
  280.   ENDIF
  281.  
  282. TRANSMIT "GO "     ; Start to tell CIS to go to a forum 
  283. TRANSMIT S8        ; Now tell CIS the third target forum name 
  284. TRANSMIT "^M"       ; Now send a carriage return 
  285. WAITFOR "<CR> !"  ; Wait for the prompt 
  286. SENDFILE ASCII S9  ; Send the third file you picked 
  287. ALARM 1            ; Beep for 1 second to signal that messages sent 
  288. MESSAGE "^M^J THIS WAS THIRD AND LAST FORUM SELECTED."
  289. MESSAGE "^M^J        COMMAND FILE TERMINATED."
  290. EXIT               ; End command file
  291.  
  292. ;  ***  SUBROUTINE AREA  *** 
  293. ERROR_1:     ; Jump here if file to be sent is not found on disk
  294.      LOCATE 13 10 
  295.      ALARM 1
  296.      MESSAGE "            FILE NOT FOUND." 
  297.      MESSAGE "  " 
  298.      MESSAGE " (If the file is not in your current directory," 
  299.      MESSAGE " precede the file name with the drive and path " 
  300.      MESSAGE "            (e.g., b:\doc\msg.1)" 
  301.      MESSAGE "  " 
  302.      MESSAGE " To try again, press the Y key and then press ENTER: " 
  303.      MESSAGE "  "
  304.      MESSAGE " To end this command file, hit any other key now." 
  305.      LOCATE 19 53
  306.      GET S9 1      ; Get the response to the error message 
  307.                    ; Beep if more than 1 character long 
  308.      FIND S9 "y"   ; Look for a Y 
  309.        IF FOUND    ; If got a Y, 
  310.           CLEAR    ; Clear the screen 
  311.           GOTO LOOP_2    ; And go back to loop_2 for another chance 
  312.        ELSE        ; If any other key hit, do this 
  313.           ALARM 1  ; Beep for one second
  314.        CLEAR    ; Clear the screen
  315.           LOCATE 12, 21  ; Put message in middle of blank screen
  316.           MESSAGE "^M^J Y key not hit--COMMAND FILE TERMINATED"
  317.           EXIT     ; End command file
  318.        ENDIF 
  319. ;AUTHOR:  Richard Burt, 71511, 3655
  320. ;Edited for PROCOMM PLUS version 1.1x by Holly Henry, 73727,406