
Originally Posted by
NoUserName
think i will go with something like this i just cant grasp TPA's yet stupid things any ideas on how i would make it not bother looking unless there was 10 pixels off color there?
You would do this with ATPAs:
Simba Code:
Function FindMyObject : Boolean;
Var
Points : array of TPoint;
ATPA : array of array of TPoint;
i, H : integer;
begin
FindColorsSpiralTolerance(MSCX, MSCY, Points, 28492, MSX1, MSY1, MSX2, MSY2, 8);//Set the colour and tolerance here
//That searches for your colour, and stores all the instances of it in "Points"
TPAToATPAWrap(Points, 40, ATPA);
SetArrayLength(Points, GetArrayLength(ATPA));
H := high(ATPA);
for i := 0 to H do //This goes through all of the points stored
begin
if(GetArrayLength(ATPA[i]) < 10)then
Continue;
Points[i] := MiddleTPA(TPA[i]);
MouseBox(Points[i].x - 5, Points[i].y - 5, Points[i].x + 5, Points[i].y + 5, mouse_Move); //It moves your mouse to each one
if(WaitUpTextMulti(['Uptext goes here'], 200+Random(500)))then //And checks the uptext
begin
Result := True;
ClickMouse2(mouse_Left);
exit;
end;
end;
end;