Sjoe
2013-02-10 18:22:10
As you see in the picture below
A lot of TPA's, and I tried to narrow them down, but the Deposit color isn't unique enough.
It even highlight the bankers :p
What I was wondering is how I could get my ATPA to only click on the depositbox, since it will hover 2 times now, bankers then the desk on my right side.
Since I'm not always ending in that exact position. I'm not only searching for the left side. This is for learning purposes too, for further causes. So I would know how to filter the objects I don't need.

A lot of TPA's, and I tried to narrow them down, but the Deposit color isn't unique enough.
It even highlight the bankers :p
What I was wondering is how I could get my ATPA to only click on the depositbox, since it will hover 2 times now, bankers then the desk on my right side.
Since I'm not always ending in that exact position. I'm not only searching for the left side. This is for learning purposes too, for further causes. So I would know how to filter the objects I don't need.
function OpenDepositBoxCustom:Boolean;
var
TooLong, x, y, i, H, CTS :Integer;
TPA: TpointArray;
ATPA: T2DPointArray;
begin
if Depositscreen then
begin
Result := True;
Exit;
end;
Marktime(Toolong)
CTS := GetToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48,0.08);
if FindColorsTolerance(TPA, 6381925, MSX1, MSY1, MSX2, MSY2, 12) then
begin
SetColorToleranceSpeed(CTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
SplitTPAExWrap(TPA, 20, 20, ATPA);
SortATPAFromMidPoint(ATPA, Point(MSCX, MSCY));
SortATPASize(ATPA, True);
// Smart_DebugATPA(True, ATPA);
H := High(ATPA)
begin
for i:=0 to H do
begin
MiddleTpaEx(ATPA[i], x, y);
HumanMMouse(x, y, 10, 10)
if WaitUptextMulti(['Dep','pos', 'box'] , 800) then
begin
Fastclick(True);
if WaitFunc(@DepositScreen, 100, 3000) then
begin
Result :=True;
Exit;
end;
end;
end;
end;
end;
end;