SRL Archive - FAQ

Little help with FindColorSpiralTolerance, please?


Zeta Matt

2013-09-04 19:49:46

How does it actuallly work? I read the explanation on the documentation, but wasn't very bright… so where, exactly, does this function start looking for colors? Is it from the center of the box I assigned to the edges of it?

tealc

2013-09-05 01:10:32

Im not sure but I think it starts at the x,y coordinates



check out LoadSpiralPath
https://github.com/MerlijnWajer/Simba/blob/master/Units/MMLCore/finder.pas#L483

Mark

2013-09-05 05:34:34

yeah it starts from the centre of the coordinates you set so for example

if FindColorSpiralTolerance(x, y, Color, BoxTopleftX, BoxTopLeftY, BoxBottomRightX, BoxBottomRightY, 15)then
begin
Mouse(x, y, Xoffset, Yoffset, Mouse_Left);
end;

This function searches from the centre of the Box you Specify outward till it finds the color specified with the givin tolerance.

Zeta Matt

2013-09-07 11:41:56

Thanks :)