home *** CD-ROM | disk | FTP | other *** search
- /*
- */
-
- Options Results
-
-
- /* -------------------- Set Prefs Here ----------------- */
- PathToConfig = 'PCommBoot.1:pconfig/data/PCommBoot.config'
- PathToRainboot = 'PCommBoot.1:rainboot2.2beta/rainboot2'
- PathToCookies = 'cookies.txt'
- LinesInCookies = 176
- /* -------------------- Set Prefs Here ----------------- */
-
-
- address command
- pathtorainboot pathtoconfig
- 'waitforport RAINBOOTREXX'
- If ~SHOW('P', "RAINBOOTREXX") THEN DO
- SAY "Rainboot2 must be running!"
- EXIT 0
- END
- call random(,,time("S"))
- line = random(1,linesincookies)
- call open(cookiestream,pathtocookies,R)
- lineread = 0
- do until eof(cookiestream)
- cookieline = readln(cookiestream)
- lineread = lineread + 1
- if lineread = line then break
- end
- call close(cookiestream)
- ADDRESS RAINBOOTREXX
- WAITFOREND
- TimesToWrap = Wrap()
- Wrapped = 0
- attempt = 0
- YVAR = 480
- If TimesToWrap = 1 then do
- SENDSTR '%D1%F03%X10%Y480%C0'cookieline
- Exit
- End
- Do until TimesToWrap = Wrapped
- SENDSTR '%D1%F03%X15%Y'YVAR'%C0%D5 'left(cookieline,80)
- if result = "TRUE" then do
- Wrapped = Wrapped + 1
- cookieline = right(cookieline,length(cookieline)-80)
- YVAR = YVAR + 12 * wrapped
- end
- attempt = attempt + 1
- if attempt = 50 then exit
- address command 'c:wait 1'
- end
- exit
- Wrap:
- timestowrap = length(cookieline)/80
- if timestowrap > 5 then exit
- if timestowrap > 4 then return 5
- if timestowrap > 3 then return 4
- if timestowrap > 2 then return 3
- if timestowrap > 1 then return 2
- return 1