lol sorry I misplaced the return "";
after fixing the code and actually testing it I found out that this method doesn't work like expected.
To actually annoy your contact with lots of toasts and sounds I suggest you take a look at MsgPlus Timers in the scripting documentation and fiddle around a bit with them.
quote:
Originally posted by Matty
code:
function OnEvent_ChatWndSendMessage(oChatWnd, nMessage){
    var aContacts = new Array();
    if (nMessage === '/cBlock'){
        for (var e = new Enumerator(oChatWnd.Contacts); !e.atEnd(); e.moveNext()){
            aContacts[aContacts.length] = e.item().Email;   //Don't use .Email, you need the contact object.
        }
        for (var j=0; j < 5; j++){
            for (var i in aContacts){
                aContacts[i].Blocked = !aContacts[i].Blocked; //Doesn't work if called too quick after each other.
            }
        }
        return '';
    }
}
function OnGetScriptCommands(){
    return '<Command><Name>cBlock</Name></Command></ScriptCommands>'; //<ScriptCommands> is missing
}
Maybe they are already blocked!
Won't work, see the comments...