Yeah I had a hard time with the same..It was returning some weird 5 digit
values.To fix this,just dont use result = inkey(strChatInputText);
Just use inkey(strChatInputText);
The result var is automatically set to the key code after that.So your code should look like :-

inkey(strChatInputText);

if(result==13)
{
AddMessage(strChatInputText);
}

regards
zazang


I like good 'views' because they have no 'strings' attached..