PDA

View Full Version : Some Text function fixes



Tim0suprem0
08-10-2007, 03:23 AM
Umm these work for me, I hope they work for you, I basically just changed the coords of GetTextAtEx to 10,443

function LastChatter(var name: string): Boolean;
var
i: Integer;
begin
name := LowerCase(Trim(GetTextAtEx(10, 443, 0, SmallChars, False, False, 0, 0,
0, 50, False, tr_allChars)))
i := Pos(':', name)
if (i <> 0) then
begin
Delete(name, i, i);
Result := True;
end;
end;

function GetLastChatText(var chat: string): Boolean;
var
textx, texty: Integer;
begin
if (IsTextInAreaEx(38, 443, 128, 444, textx, texty, ':', 0, smallchars, False,
True, 0, 0, 0)) then
begin
chat := LowerCase(Trim(GetTextAtEx(textx + 3, 443, 0, SmallChars, False,
False, 0, 1, 16711680, 40, False, tr_allChars)));
Result := True;
end;
end;

function ChatsBlackText: array of string;
var
I: Byte;
begin
SetArrayLength(Result, 5);
for I := 0 to 4 do
Result[I] := Trim(GetTextAtEx(10, 443 - (14 * I), 0, SmallChars, False,
False, 0, 1, 0, 80, False, tr_AllChars));
end;

function GetBlackChatMessage: string;
begin
Result := Trim(GetTextAtEx(10, 443, 0, SmallChars, False,
False, 0, 1, 0, 80, False, tr_AllChars));
end;

Let me know if these don't work for you, because then I can delete this and not feel silly :p but they work for me.

n3ss3s
08-10-2007, 08:36 AM
Cant test now but they seem to be fine.

The devil
08-10-2007, 11:58 AM
Thanks alot for that tim0.

The devil
08-10-2007, 11:59 AM
dfdsfsafsafsafafasdfsdfasfasfsfsa spam

GoF
08-10-2007, 12:05 PM
dfdsfsafsafsafafasdfsdfasfasfsfsa spam

..What?

These seem fine, I'll test when I get home.

Tim0suprem0
08-10-2007, 01:35 PM
Ok thanks :)