quote:
Originally posted by foaly
well that code has to be in de onrecieved event... so you'll get something like this:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
if(Message.charAt(0)=="." && Message.charAt(1)=="/" && Message.charAt(2)=="x" && Message.charAt(3)==" "){
ChatWnd.SendMessage("/close");
}
}
that should work...
The code was already on the recievemessage function, though i didnt to paste the full code because there are snippets i dont want to give by now ^^
I was pretty looking for this:
code:
ChatWnd.SendMessage("/close");
Thank you! ^^
EDIT:
So, now i'm facing another problem.
I'm using ChatWnd.SendMessage(); to send messages i recieve to the rest of open windows, using /msgall , but it seems to send the same message various times (3 messages of around 10 lines, wich only the last line of those currently has the message).
So, ideas? O.o