1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-18 21:42:20 -05:00
Simba/Tests/PS/blackchat.simba

32 lines
576 B
Plaintext
Raw Normal View History

2010-04-09 16:02:20 -04:00
program new;
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 514;
MCY2 = 475;
Function TextCoords(textn: Integer): TPoint;
Begin
Result.X := 10;
Result.Y := 347 + (14 * (textn - 1));
End;
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, 0)) then
begin
B := GetTPABounds(cArr);
2010-04-16 11:04:50 -04:00
Result := GetTextAt(B.x1 - 1, B.y1 - 1,1, 4, 1, 0, 0, 100, 'SmallChars');
2010-04-09 16:02:20 -04:00
end;
end;
begin
2010-04-16 11:04:50 -04:00
Writeln(GetChatBoxText(8, 0));
2010-04-09 16:02:20 -04:00
end.