home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / roboos2b.zip / OS2-DOW.RS next >
Text File  |  1994-03-11  |  8KB  |  300 lines

  1. TITLE "OS2Shareware File Download"
  2.  
  3. ;Will download up to 9 files
  4. ;For more use a second script.
  5.  
  6. ; The numbers on the next lines don't actually do anything.  They are
  7. ; only added to increase the readability of the script.  Robocomm
  8. ; always numbers parameters in the order they are encountered in
  9. ; the file.
  10.  
  11. PARAMETER 1 "Enter 1st File Name to GET"
  12. PARAMETER 2 "Enter 2nd File Name to GET"
  13. PARAMETER 3 "Enter 3rd File Name to GET"
  14. PARAMETER 4 "Enter 4st File Name to GET"
  15. PARAMETER 5 "Enter 5th File Name to GET"
  16. PARAMETER 6 "Enter 6th File Name to GET"
  17. PARAMETER 7 "Enter 7th File Name to GET"
  18. PARAMETER 8 "Enter 8th File Name to GET"
  19. PARAMETER 9 "Enter 9th File Name to GET"
  20. ENDPARAMS
  21.  
  22.     TIMEOUT 120
  23.  
  24.     IF NOT CONNECTED GOTO NotOn
  25.     WHEN "MESSAGE: SEND "M"
  26.     SEND "|"
  27.     WHEN "to continue" Send "|"
  28.     WHEN "More [Y,n,=]?" SEND "|"
  29.  
  30. ; Send a bunch of <CR> to get through the other prompts
  31. ; without modifications
  32.     CLEAR
  33.     WHEN "to continue" Send "|"
  34.     WHEN "More [Y,n,=]?" SEND "|"
  35.  
  36.     SEND "||"
  37.     WAITFOR "MAIN:" FAILURE HANGUP
  38.  
  39. ; Change to File Area
  40.     MESSAGE "Changing to File Area"
  41.     SEND "F"
  42.     WAITFOR "FILE:"
  43.  
  44. ; Getting File 1
  45. :GetFile1
  46.     IF EMPTY "%P1%" GOTO GetFile2
  47.     Message "Initiating Download of %P1% "
  48.     Send "D"
  49.     Waitfor "download (#"
  50.     Message "Requesting %P1% file"
  51.     IF NOT EMPTY "%P1%" SEND "%P1%|"
  52.     CLEAR
  53.     WHEN "I see no" GOTO NoFile1
  54.     WHEN "Transfer aborted." GOTO Aborted1
  55.     WAITFOR "download (#"
  56.     Message "Sending Enter To Start Download"
  57.     SEND "|"
  58.     Waitfor "times to cancel."
  59.     Message "Starting Protocol"
  60.     Download "%DLDIR%%P1%" Using "%BBS20%"
  61.     IF ERRORLEVEL MESSAGE "Download of %P1% Failed with Protocol Error"
  62.     SEND "||"
  63.     GOTO GetFile2
  64.  
  65. :NoFile1
  66.     MESSAGE "File %P1% is not on board"
  67.     SEND "||"
  68.     GOTO GetFile2
  69. :Aborted1
  70.     Message "Transfer aborted, Probably no time"
  71.  
  72. :GetFile2
  73.     IF EMPTY "%P2%" GOTO GetFile3
  74.     Message "Initiating Download of %P2%"
  75.     Send "D"
  76.     WAITFOR "download (#"
  77.     Message "Requesting %P2% file"
  78.     IF NOT EMPTY "%P2%" SEND "%P2%|"
  79.     CLEAR
  80.     WHEN "I see no" GOTO NoFile2
  81.     WHEN "Transfer aborted." GOTO Aborted2
  82.     WAITFOR "download (#"
  83.     Message "Sending Enter To Start Download"
  84.     SEND "|"
  85.     WAITFOR "times to cancel."
  86.     Message "Starting Protocol"
  87.     Download "%DLDIR%%P2%" Using "%BBS20%"
  88.     IF ERRORLEVEL MESSAGE "Download of %P2% Failed with Protocol Error"
  89.     SEND "||"
  90.     GOTO GetFile3
  91.  
  92. :NoFile2
  93.     MESSAGE "File %P2% is not on board"
  94.     SEND "||"
  95.     GOTO GetFile3
  96. :Aborted2
  97.     Message "Transfer aborted, Probably no time"
  98.  
  99. :GetFile3
  100.     IF EMPTY "%P3%" GOTO GetFile4
  101.     Message "Initiating Download of %P3%"
  102.     Send "D"
  103.     WAITFOR "download (#"
  104.     Message "Requesting %P3% file"
  105.     IF NOT EMPTY "%P3%" SEND "%P3%|"
  106.     CLEAR
  107.     WHEN "I see no" GOTO NoFile3
  108.     WHEN "Transfer aborted." GOTO Aborted3
  109.     WAITFOR "download (#"
  110.     Message "Sending Enter To Start Download"
  111.     SEND "|"
  112.     WAITFOR "times to cancel."
  113.     Message "Starting Protocol"
  114.     Download "%DLDIR%%P3%" Using "%BBS20%"
  115.     IF ERRORLEVEL MESSAGE "Download of %P3% Failed with Protocol Error"
  116.     SEND "||"
  117.     GOTO GetFile4
  118.  
  119. :NoFile3
  120.     MESSAGE "File %P3% is not on board"
  121.     SEND "||"
  122.     GOTO GetFile4
  123. :Aborted3
  124.     Message "Transfer aborted, Probably no time"
  125.  
  126. :GetFile4
  127.     IF EMPTY "%P4%" GOTO GetFile5
  128.     Message "Initiating Download of %P4%"
  129.     Send "D"
  130.     WAITFOR "download (#"
  131.     Message "Requesting %P4% file"
  132.     IF NOT EMPTY "%P4%" SEND "%P4%|"
  133.     CLEAR
  134.     WHEN "I see no" GOTO NoFile4
  135.     WHEN "Transfer aborted." GOTO Aborted4
  136.     WAITFOR "download (#"
  137.     Message "Sending Enter To Start Download"
  138.     SEND "|"
  139.     WAITFOR "times to cancel."
  140.     Message "Starting Protocol"
  141.     Download "%DLDIR%%P4%" Using "%BBS20%"
  142.     IF ERRORLEVEL MESSAGE "Download of %P4% Failed with Protocol Error"
  143.     SEND "||"
  144.     GOTO GetFile5
  145.  
  146. :NoFile4
  147.     MESSAGE "File %P4% is not on board"
  148.     SEND "||"
  149.     GOTO GetFile5
  150. :Aborted4
  151.     Message "Transfer aborted, Probably no time"
  152.  
  153. :GetFile5
  154.     IF EMPTY "%P5%" GOTO GetFile6
  155.     Message "Initiating Download of %P5%"
  156.     Send "D"
  157.     WAITFOR "download (#"
  158.     Message "Requesting %P5% file"
  159.     IF NOT EMPTY "%P5%" SEND "%P5%|"
  160.     CLEAR
  161.     WHEN "I see no" GOTO NoFile5
  162.     WHEN "Transfer aborted." GOTO Aborted5
  163.     WAITFOR "download (#"
  164.     Message "Sending Enter To Start Download"
  165.     SEND "|"
  166.     WAITFOR "times to cancel."
  167.     Message "Starting Protocol"
  168.     Download "%DLDIR%%P5%" Using "%BBS20%"
  169.     IF ERRORLEVEL MESSAGE "Download of %P5% Failed with Protocol Error"
  170.     SEND "||"
  171.     GOTO GetFile6
  172.  
  173. :NoFile5
  174.     MESSAGE "File %P5% is not on board"
  175.     SEND "||"
  176.     GOTO GetFile6
  177. :Aborted5
  178.     Message "Transfer aborted, Probably no time"
  179.  
  180. :GetFile6
  181.     IF EMPTY "%P6%" GOTO GetFile7
  182.     Message "Initiating Download of %P6%"
  183.     Send "D"
  184.     WAITFOR "download (#"
  185.     Message "Requesting %P6% file"
  186.     IF NOT EMPTY "%P6%" SEND "%P6%|"
  187.     CLEAR
  188.     WHEN "I see no" GOTO NoFile6
  189.     WHEN "Transfer aborted." GOTO Aborted6
  190.     WAITFOR "download (#"
  191.     Message "Sending Enter To Start Download"
  192.     SEND "|"
  193.     WAITFOR "times to cancel."
  194.     Message "Starting Protocol"
  195.     Download "%DLDIR%%P6%" Using "%BBS20%"
  196.     IF ERRORLEVEL MESSAGE "Download of %P6% Failed with Protocol Error"
  197.     SEND "||"
  198.     GOTO GetFile7
  199.  
  200. :NoFile6
  201.     MESSAGE "File %P6% is not on board"
  202.     SEND "||"
  203.     GOTO GetFile7
  204. :Aborted6
  205.     Message "Transfer aborted, Probably no time"
  206.  
  207. :GetFile7
  208.     IF EMPTY "%P7%" GOTO GetFile8
  209.     Message "Initiating Download of %P7%"
  210.     Send "D"
  211.     WAITFOR "download (#"
  212.     Message "Requesting %P7% file"
  213.     IF NOT EMPTY "%P7%" SEND "%P7%|"
  214.     CLEAR
  215.     WHEN "I see no" GOTO NoFile7
  216.     WHEN "Transfer aborted." GOTO Aborted7
  217.     WAITFOR "download (#"
  218.     Message "Sending Enter To Start Download"
  219.     SEND "|"
  220.     WAITFOR "times to cancel."
  221.     Message "Starting Protocol"
  222.     Download "%DLDIR%%P7%" Using "%BBS20%"
  223.     IF ERRORLEVEL MESSAGE "Download of %P7% Failed with Protocol Error"
  224.     SEND "||"
  225.     GOTO GetFile8
  226.  
  227. :NoFile7
  228.     MESSAGE "File %P7% is not on board"
  229.     SEND "||"
  230.     GOTO GetFile8
  231. :Aborted7
  232.     Message "Transfer aborted, Probably no time"
  233.  
  234. :GetFile8
  235.     IF EMPTY "%P8%" GOTO GetFile9
  236.     Message "Initiating Download of %P8%"
  237.     Send "D"
  238.     WAITFOR "download (#"
  239.     Message "Requesting %P8% file"
  240.     IF EMPTY "%P1%" GOTO GetFile9
  241.     IF NOT EMPTY "%P8%" SEND "%P8%|"
  242.     CLEAR
  243.     WHEN "I see no" GOTO NoFile8
  244.     WHEN "Transfer aborted." GOTO Aborted8
  245.     WAITFOR "download (#"
  246.     Message "Sending Enter To Start Download"
  247.     SEND "|"
  248.     WAITFOR "times to cancel."
  249.     Message "Starting Protocol"
  250.     Download "%DLDIR%%P8%" Using "%BBS20%"
  251.     IF ERRORLEVEL MESSAGE "Download of %P8% Failed with Protocol Error"
  252.     SEND "||"
  253.     GOTO GetFile9
  254.  
  255. :NoFile8
  256.     MESSAGE "File %P8% is not on board"
  257.     SEND "||"
  258.     GOTO GetFile9
  259. :Aborted8
  260.     Message "Transfer aborted, Probably no time"
  261.  
  262. :GetFile9
  263.     IF EMPTY "%P9%" GOTO GetFile10
  264.     Message "Initiating Download of %P9%"
  265.     Send "D"
  266.     WAITFOR "download (#"
  267.     Message "Requesting %P9% file"
  268.     IF NOT EMPTY "%P9%" SEND "%P9%|"
  269.     CLEAR
  270.     WHEN "I see no" GOTO NoFile9
  271.     WHEN "Transfer aborted." GOTO Aborted9
  272.     WAITFOR "download (#"
  273.     Message "Sending Enter To Start Download"
  274.     SEND "|"
  275.     WAITFOR "times to cancel."
  276.     Message "Starting Protocol"
  277.     Download "%DLDIR%%P9%" Using "%BBS20%"
  278.     IF ERRORLEVEL MESSAGE "Download of %P9% Failed with Protocol Error"
  279.     SEND "||"
  280.     GOTO GetFile10
  281.  
  282. :NoFile9
  283.     MESSAGE "File %P9% is not on board"
  284.     SEND "||"
  285.     GOTO GetFile10
  286. :Aborted9
  287.     Message "Transfer aborted, Probably no time"
  288.  
  289. :GetFile10
  290.  
  291.     SEND "|||"
  292.     WAITFOR "FILE:"
  293.     SEND "M"
  294.     Exit 0
  295.  
  296. :NotOn
  297.         Message "Make Sure SCript to Execute After Log On"
  298.         Message "is Set in BBs Systems"
  299.         Exit 1
  300.