Hi, I'm having trouble to get this to work, when I debug it is finding the ATPA's. It doesn't seem to work from that point on. I've been trying to figure it out for ages, is there something I am missing?
Code:program New; {.Include srl/srl.scar} {.Include srl/srl/Misc/Debug.scar} var x, y : Integer; function Chop_Tree : Boolean; var LW, CTS, I, C, H: Integer; TPA: TPointArray; ATPA: T2DPointArray; begin Result := False; LW := 15; // For Debugging CTS := GetColorToleranceSpeed; ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.06, 1.04); FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2978660, MSX1, MSY1, MSX2, MSY2, 13); ColorToleranceSpeed(CTS); ATPA := TPAToATPAEx(TPA, LW, LW); WriteLn('1'); // For Debugging if Length(ATPA) = 0 then WriteLn('TP not found'); Exit; // DebugATPA(ATPA, ''); C := 0; // For Debugging H := High(ATPA); For I := 0 to H do begin MiddleTPAEx(ATPA[i], x, y); MMouse(x, y, 2, 2); WriteLn('2' + IntToStr(C)); // For Debugging C := C + 1; // For Debugging If(IsUpTextMultiCustom(['Yew', 'Ye', 'ew'])) then begin Result := True; GetMousePos(x, y); Break; end; end; end; // Yew colors : 1592641 4690563 3766379 3898735 1725510 3700331 begin ActivateClient; Chop_Tree; end.







Reply With Quote

