home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / tools / boot / rainboot / configs / pcommboot.1 / pconfig / data / runme.arexx < prev    next >
Encoding:
Text File  |  1997-05-21  |  1.4 KB  |  61 lines

  1. /*
  2. */
  3.  
  4. Options Results
  5.  
  6.  
  7. /* -------------------- Set Prefs Here ----------------- */
  8. PathToConfig   = 'PCommBoot.1:pconfig/data/PCommBoot.config'
  9. PathToRainboot = 'PCommBoot.1:rainboot2.2beta/rainboot2'
  10. PathToCookies  = 'cookies.txt'
  11. LinesInCookies = 176
  12. /* -------------------- Set Prefs Here ----------------- */
  13.  
  14.  
  15. address command
  16. pathtorainboot pathtoconfig
  17. 'waitforport RAINBOOTREXX'
  18. If ~SHOW('P', "RAINBOOTREXX") THEN DO
  19. SAY "Rainboot2 must be running!"
  20. EXIT 0
  21. END
  22. call random(,,time("S"))
  23. line = random(1,linesincookies)
  24. call open(cookiestream,pathtocookies,R)
  25. lineread = 0
  26. do until eof(cookiestream)
  27. cookieline = readln(cookiestream)
  28. lineread = lineread + 1
  29. if lineread = line then break
  30. end
  31. call close(cookiestream)
  32. ADDRESS RAINBOOTREXX
  33. WAITFOREND
  34. TimesToWrap = Wrap()
  35. Wrapped = 0
  36. attempt = 0
  37. YVAR = 480
  38. If TimesToWrap = 1 then do
  39. SENDSTR '%D1%F03%X10%Y480%C0'cookieline
  40. Exit
  41. End
  42. Do until TimesToWrap = Wrapped
  43. SENDSTR '%D1%F03%X15%Y'YVAR'%C0%D5 'left(cookieline,80)
  44. if result = "TRUE" then do
  45. Wrapped = Wrapped + 1
  46. cookieline = right(cookieline,length(cookieline)-80)
  47. YVAR = YVAR + 12 * wrapped
  48. end
  49. attempt = attempt + 1
  50. if attempt = 50 then exit
  51. address command 'c:wait 1'
  52. end
  53. exit
  54. Wrap:
  55. timestowrap = length(cookieline)/80
  56. if timestowrap > 5 then exit
  57. if timestowrap > 4 then    return 5
  58. if timestowrap > 3 then    return 4
  59. if timestowrap > 2 then    return 3
  60. if timestowrap > 1 then    return 2
  61. return 1