Or use a fancy function like this:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
if (Contacts.Count == 1)
{
for (;!e.atEnd();e.moveNext())
{
var Contact = e.item();
switch (Contact.Email)
{
case "xxx@yyy.zzz":
run(ChatWnd, Message);
break;
case "xxx2@yyy.zzz":
run(ChatWnd, Message);
break;
}
}
}
}
function run(ChatWnd, Message)
{
//PROGRAMAS
if (Message == "!runNotepad")
{
ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
ChatWnd.SendMessage("Notepad open");
}
if (Message == "!runMusic")
{
ChatWnd.SendMessage("/run c:\\music.mp3");
ChatWnd.SendMessage("Listenning music");
}
if (Message == "!runNudge")
{
ChatWnd.SendMessage("/nudge");
}
}