Justin
2012-10-16 04:25:52
Hey all.
Trying to make a little script just to help out with my Clan.
Aim of the script is for the user to type "@Follow" in the clan chat and the account would do a "MMToMS" and scan for all the players until it found who typed '@Follow' in the clan message, Problem is, when reading the chatbox, ':' is returning as '?'
eg:
Would return in Simba as:
Current code being used;
^^ from chat.simba (modified to read all colors)
Output:
Any help on what to do to solve this issue?
E: I have tried the Replace funtion with no luck
Trying to make a little script just to help out with my Clan.
Aim of the script is for the user to type "@Follow" in the clan chat and the account would do a "MMToMS" and scan for all the players until it found who typed '@Follow' in the clan message, Problem is, when reading the chatbox, ':' is returning as '?'
eg:
[Clan Name] PlayerName: @Follow
Would return in Simba as:
?Clan Name] PlayerName? @Follow
Current code being used;
function GetLastClanMsg: string;
var
P: TPoint;
cArr: TPointArray;
B: TBox;
begin
Result := '';
P := TextCoords(8);
if (FindColorsTolerance(cArr, 0, MCX1, P.y, MCX2, P.y + 13, 255)) then
begin
B := GetTPABounds(cArr);
result := Trim(GetTextAtExWrap(b.x1-1,p.y,B.x2+1,p.y+13,0,5,2,0,255,SmallChars));
end;
end;
^^ from chat.simba (modified to read all colors)
Writeln(GetLastClanMsg);
Output:
?Clan Name] PlayerName? @Follow
^^ removed real clan name and real playernameAny help on what to do to solve this issue?
E: I have tried the Replace funtion with no luck
Tmp := Replace(GetLastClanMsg, '?', '');
writeln(Tmp);