SRL Archive - OSR Help

Find Color Function


Death12652

2010-05-08 05:14:20

When I use any FindColor or FindColorTolerance I get a variable expected in script line x:y which is the spot after C in FindColor and after the a in FindColorTolerance. I used all numbers with an if then statement.

Here's what it is…


Procedure Blah;
begin
if (FindColor(26, 12, 8639680, 12, 4, 45, 25)) then
begin
Mouse(26, 12, 1, 1, True);
end;
end;

any suggestions would help…

Its suppose to find the start in the top left on vista…

and click on it…

Dgby714

2010-05-08 05:24:05

From: death12652
When I use any FindColor or FindColorTolerance I get a variable expected in script line x:y which is the spot after C in FindColor and after the a in FindColorTolerance. I used all numbers with an if then statement.

Here's what it is…


Procedure Blah;
begin
if (FindColor(26, 12, 8639680, 12, 4, 45, 25)) then
begin
Mouse(26, 12, 1, 1, True);
end;
end;

any suggestions would help…

Its suppose to find the start in the top left on vista…

and click on it…



procedure Blah;
var
x, y: integer;
begin
if (FindColor(x, y, 8639680, 12, 4, 45, 25)) then
begin
Mouse(x, y, 1, 1, True);
end;
end;

Sir R. M8gic1an

2010-05-08 05:52:34



Procedure Blah;
var
x, y: integer;
begin
if (FindColor(x, y, 8639680, 12, 4, 45, 25)) then
begin
Mouse(x, y, 1, 1, True);
end;
end;

That's what you need. FindColor finds the color and stores the coords to x, y.

edit: ninjaed.

~RM