I get what you mean. Here is the new code:
JScript code:
var messages = new Array(), i=new Array();
messages[0] = "First Message";
messages[1] = "Second Message";
messages[2] = "Third Message";
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message){
if(Origin != Messenger.MyName){
if(!i[ChatWnd.Handle])i[ChatWnd.Handle]=0;
if(i[ChatWnd.Handle] == messages.length)i[ChatWnd.Handle]=0;
ChatWnd.SendMessage(messages[i[ChatWnd.Handle]++]);
}
}
This SHOULD work although I haven't tested it.