quote:
Originally posted by roflmao456
code:
var talk = false;
function OnEvent_ChatWndCreated(Chatwndtest){
talk = true;
}
function OnEvent_ChatWndReceiveMessage(ChatWndtest,Origin,Message,MessageKind){
if (Origin != Messenger.MyName && MessageKind == 1 && talk == true)
{
merlin.Show(); // Shows Merlin
sayMessage = Origin + " says: " + Message;
sayMessage = MsgPlus.RemoveFormatCodes(sayMessage);
merlin.Speak (sayMessage); // Makes Merlin say the variable
talk = false;
}
}
should work
That's not a very good method and in fact will not work in the following scenario:
Person A opens a conversation with you
Person B opens a conversation with you
Person A messages you <-- MSagent will appear as planned
Person B messages you <-- Nothing will happen.
What you would probably need is for the variable talk to be replaced with an array which can be indexed with the window handle or something - that way the Agent will appear for the first message in every conversation window.