MessageKind is optional, it does not need to be declared in the function in this case...
Anyway... not sure if this is what you really wanted.
code:
//number of times to send message
var times = "2";
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message)
{
if (Origin != Messenger.MyName)
{
if (Origin == "example@hotmail.com")
{
if (Message == "hi")
{
for(i=0; i<times; i++)
{
ChatWnd.SendMessage("hey, how r u");
}
}
}
}
}