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

Pages: (2): « First « 1 [ 2 ] Last »
help me out writing a script
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / 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
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
O.P. RE: help me out writing a script
thanx spunky
wat i said i wanted though was a script my contact installs and then displays the message when they are talking to me but not someone else

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














11-14-2006 11:36 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: help me out writing a script
Edited previous post...
<Eljay> "Problems encountered: shit blew up" :zippy:
11-14-2006 11:39 AM
Profile PM Find Quote Report
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
O.P. RE: help me out writing a script
thanx soooooo much
your so clever

This post was edited on 11-14-2006 at 11:43 AM by Jarrod.

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














11-14-2006 11:41 AM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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