For anybody wondering how to do this. The finished working code is below:
Code:
program new;
{$I SRL-6/SRL.simba}
var
BlueBox := intToBox(48, 247, 216, 260);
TPA: TPointArray;
procedure findbox();
begin
if (FindColorsTolerance(TPA, 11165734, Bluebox, 1)) then
writeln('Found color')
else
writeln('Didnt find color');
end
begin
findbox();
end.
You can also do it by checking the length of the TPA:
Code:
program new;
{$I SRL-6/SRL.simba}
var
BlueBox := intToBox(48, 247, 216, 260);
TPA: TPointArray;
procedure findbox();
begin
FindColorsTolerance(TPA, 11165734, Bluebox, 1);
if length(TPA) < 1 then
writeln('no')
else
writeln('yes');
end
begin
findbox();
end.
I hope this helps somebody.