Log in

View Full Version : how to use repeat, until find coloursprial?



deviney
06-17-2007, 11:33 AM
Hi all
Its me Deviney

I was just wondering how it is possible to keep repeating a load of code until a color sprial is found in the inventory?

e.g

begin
repeat
if find colorsprial(blah blah)
mouse(blahbalh)
until(find coloursprial(this part equals the inventory)
end.

What would the until be in real code thanks.

ill rep+ you

Regards
Deviney

bullzeye95
06-17-2007, 01:07 PM
I'm not entirely sure what you're asking, but it seems you're asking how to use a repeat loop until a color is found? If that's what you're asking, you'd just put a FindColorSpiral or FindColorSpiralTolerance in there.

tim46
06-17-2007, 01:42 PM
You could do something like

procedure RepeatColor;
var Found, ColorMark: Boolean;
begin
MarkTime(ColorMark);
repeat
if find colorsprial(blah blah)then
begin
mouse(blahbalh);
Found:=True;
end;
until(Found) or (TimeFromMark(ColorMark) >= 120000);//Until it finds the color or 2 minutes have passed
end;