You're whole syntax is wrong for JScript
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext()){
var Contact = e.item();
if(Contact.Email==="your@email.com"){
Message = "(!n)·$4\n"+Message;
}
}
return Message
}
This method uses IRC colour tags as you don't need to add the close tag and older versions will still see the colours.
If statements must appear withing the functions just so you know for the future
(it's not actually needed in this case)
(!n) will show you're contacts name.
·$4 Will turn all following text red
\n will start a new line
+Message will append what was actually sent by you to the text you have set in the script
As this is an Event, not just a function, it is called everytime a message is sent (in this example) and so does not need to be called by the user.