Jump to content
BryceTheCoder

Why is this FindColor not working?

Recommended Posts

Sooo this is my perfect color i got:

 

75737064.png

 

 

And the code im using:

 

[scar]

procedure FindIron;

var

TPA: TPointArray;

x,y: Integer;

begin

ColorToleranceSpeed(2);

SetColorspeed2Modifiers(0.04, 0.08);

if FindColorTPATol(x,y,3162220,TPA,7) then

begin

MMouse(x,y,0,0);

writeln(x);

writeln(y);

end;

end;

[/scar]

 

 

i dont understand why its not finding the color? Please help me ASAP :c

Link to comment
Share on other sites

What's stored in your TPA?

 

It uses the points in your TPA to search from. So if you had point 0, 0 in the TPA. It would search point 0, 0 for the color you put for the color var.

 

If it found that Color at Point 0, 0 for instance. It would return the x, and y value.

Edited by LordJashin
Link to comment
Share on other sites

[scar]

procedure FindIron;

var

x,y: Integer;

begin

ColorToleranceSpeed(2);

SetColorspeed2Modifiers(0.04, 0.08);

if FindColorTol(X, Y, 3162220, 0, 0, MSPW, MSPH) then

begin

MMouse(X, Y, 0, 0);

writeln(X);

writeln(Y);

end;

SetColorspeed2Modifiers(0.02, 0.02); // You need to reset this other wise

ColorToleranceSpeed(1); // if you use OSI/GMRL functions wont work

end;

[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...