From: Junkj
procedure lookforcolor;
var x, y, color:integer;
Begin
Color:=Bitmapfromstring('1337');
repeat
Findbitmap(color, x, y)
until(findbitmap(color,x,y)
writeln('found') //or status
terminatescript;
Pretty sure it is. Add a writeln('')
And a terminatescript; so it stops when its found, knowing it works. or use status('').
That wouldn't be the smartest way to do it, as you're searching for the bitmap twice, which in turn will be slower. Try:
while(not(FindBitmap(color, x, y))) do
Null;
From: Smarter Child
Not at all, do:
repeat
if findbitmap(BLAH)then
mmouse(x, y, 2, 2);
until(IsUpText('WTF'));//Child's play lol
if IsupText('WTF')then
begin
writeln('yay it worked');
result := true;
end;
Something like that, sorry for standards wrote in comment box :p
That is correct in what Main_FTW wants…
From: Junkj
Using some vars…
Procedure lookforbitmap;
var found :integer;
begin
repeat
If (Findbitmaptolerance(somebitmap, somex, somey, sometolerance)) then
found:=found+1
until(false)
end;
And smarter btw you dont need
until(poop)
if(poop)//this
As until already will find it.
…except Junkj is correct. You will not need the if(poop) statement, since it'll break the loop once it is found.
From: Junkj
No it wouldn't, if it finds the bitmap, then it will increase by 1 and keep repeating to find the bitmap, and if it finds it again it increase the var by 1.
It'll keep increasing it to the maximum value it can go. After that, it'll just return 0 (a.k.a False) ;)
And guys, please, the arguing ends here.