Just made this and thought other people may want to use it as well. When your status is anything except "Appear Offline" (2) or "Online" (3), any messages you receive are added to an array. The script then closes the chat window with that contact. You can use the command "!check" to list all messages received (so far it only lists them in the debug window), the sender and the Handle of the window (not needed, but I might be using this to add code later on). I made it for when I'm playing fullscreen games and dont won't to exit to Windows to find 3536376 windows open.
Let me know what you think, but I think it'll get trashed a bit
code:
var aHandle = new Array;
var aOrigin = new Array;
var aMessage = new Array;
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message){
if(Messenger.MyStatus!=2&&Messenger.MyStatus!=3){
if(Message!="!check"){
aHandle[aHandle.length] = ChatWnd.Handle;
aOrigin[aOrigin.length] = MsgPlus.RemoveFormatCodes(Origin);
aMessage[aMessage.length] = Message;
if(Origin!=Messenger.MyName){
ChatWnd.SendMessage("/close");
}
}
if(Message=="!check"){
Debug.DebuggingWindowVisible = true;
for(var a=0;a<aHandle.length;a++){
Debug.Trace("Handle: "+aHandle[a]+" | Contact: "+aOrigin[a]+" | Message: "+aMessage[a]);
}
}
}
}
PS: I did indent it, a little bit at least