SRL Archive - Help and Support

Is there any way for finding out what color did it find when using tol?


n3ss3s

2007-08-15 11:30:19

Well, I just thought that how can you see what color your tolerance color finding function finds? Lets say that I would be searching for color umm 2379127(totally random) and I would use tolerance of 20. So, since there may be other objects in the tolerance of 20, but, other objects may be in the "20", so it would be easier that you could just set tol like 5 or even less, if we would know what color the tolerance finds…..

Know what I mean?

R0b0t1

2007-08-15 18:34:00

No… Go back to English class, and post again.



Then I might be able to help you :p.

EDIT: Do you mean you want it to return the color it finds? I think it does. Try it and tell me.

bullzeye95

2007-08-15 20:05:37

if(FindColorTolerance(x, y, blahblahblah))then
TheColorItFound:= GetColor(x, y);

:)

Bobarkinator

2007-08-15 20:42:30

From: bullzeye95
if(FindColorTolerance(x, y, blahblahblah))then
TheColorItFound:= GetColor(x, y);

:)


Pretty much :f: Lol. Or you can find all the colors of that color with tol of 20 and move your mouse to all of them lol.

R0b0t1

2007-08-16 16:54:59

How would you do that? I thought it always found the first one. Or do you intend the mouse to cover up the color?

Anyway, I think you could do that by recording the position and useing FindColorSkipPointArray or what ever you call it.

Dark_Sniper

2007-08-16 23:17:24

just a quick note… if the mouse if over an obj…. the color… it does not cover it from scar:p

scar will still notice the colors under the mouse.

Bobarkinator

2007-08-17 21:18:36

From: r0b0t1
How would you do that? I thought it always found the first one. Or do you intend the mouse to cover up the color?

Anyway, I think you could do that by recording the position and useing FindColorSkipPointArray or what ever you call it.


FindColorsTolerance(TPA,Color,MSX1,MSY1,MSX2,MSY2,YourTol);
for i:=0 to GetArrayLength(TPA)-1 do
begin
MMouse(x,y,0,0);
Wait(500);
end;

n3ss3s

2007-08-18 03:46:11

-.- Im not a noob, I made this thread because my GetColor obviously doesnt work. I tried to find what was it 1510329 something like that I think with tol of 20 and it returned like 9323002

Santa_Clause

2007-08-18 08:19:36

I don't think tolerance means +- 20…

Dark_Sniper

2007-08-18 10:12:38

you need to make ether your tols smaller :p
or choose a dif color so it can return more acc…..

Killerdou

2007-08-18 10:21:32

Copyclienttobitmap(find this out yourself)
for x := 0 to(find that out)
for y := 0 to (find that out aswell lol)
if fastgetpixel(x,y) < color + tol and fastgetpixel(X, Y) > color - tol then
begin
Result := FastGetPixel(X,Y);
exit;
end;
maybe something around this?

n3ss3s

2007-08-18 11:18:34

Oh, your right, I totally forgot about those kind of functions in scar, even as useful as they are.