Naike
2008-12-23 18:44:29
Mine didnt work, i don't know if it was only happening for me but i took the time to sort it out.. ( All that was needed was 2 tolerance, on color 0?! Shouldnt be needed but fixed now anyways.)
function GetChatBoxText(Line, TextCol: Integer): string;
var
P: TPoint;
cArr: TPointArray;
B: TBox;
begin
P := TextCoords(Line);
if (FindColorsTolerance(cArr, TextCol, MCX1, P.y, MCX2, P.y + 13, 2)) then
begin
B := GetTPABounds(cArr);
Result := Trim(GetTextAtEx(B.x1 - 1, B.y1 - 2, 0, SmallChars, False, False,
0, 1, TextCol, 80, False, tr_AllChars));
end;
end;