how do you use functions such as the one that im showing?
please help thank you for your time
{************************************************* ******************************
function FindObjMulti(Text: String; color1, color2, color3, tolerance: Integer): Boolean;
By:
Description: FindsObject using three colors
************************************************** *****************************}
function FindObjMulti(Text: string; color1, color2, color3, tolerance: Integer):
Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindMSColorTol(x, y, color1, tolerance)) or
(FindMSColorTol(x, y, color2, tolerance)) or
(FindMSColorTol(x, y, color3, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (LoggedIn)) then
break;
a := a + 1;
if (a = 1) then
c := c + 1;
if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end;
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end;
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end;
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, color1, x1, y1, x2, y2, tolerance)) or
(FindColorTolerance(x, y, color2, x1, y1, x2, y2, tolerance)) or
(FindColorTolerance(x, y, color3, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0);
if (IsUpText(Text)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;


Reply With Quote


