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.
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.