What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help me out writing a script

help me out writing a script
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: help me out writing a script
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 :p (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.


This post was edited on 11-14-2006 at 11:38 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
11-14-2006 11:31 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help me out writing a script - by Jarrod on 11-14-2006 at 07:09 AM
RE: help me out writing a script - by matty on 11-14-2006 at 07:14 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 07:20 AM
RE: help me out writing a script - by NanaFreak on 11-14-2006 at 07:24 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 07:27 AM
RE: help me out writing a script - by NanaFreak on 11-14-2006 at 07:29 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 07:59 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 08:32 AM
RE: help me out writing a script - by NanaFreak on 11-14-2006 at 08:49 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 08:52 AM
RE: help me out writing a script - by Spunky on 11-14-2006 at 11:31 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 11:36 AM
RE: help me out writing a script - by Spunky on 11-14-2006 at 11:39 AM
RE: help me out writing a script - by Jarrod on 11-14-2006 at 11:41 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On