What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Creating a Command?

Creating a Command?
Author: Message:
Samo502
New Member
*


Posts: 9
Joined: Sep 2009
O.P. Creating a Command?
js code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    if(Message.substring(0, 6) == "/dispc")
    {
        var Contacts = Messenger.MyContacts;
        var e = new Enumerator(Contacts);
        for(; !e.atEnd(); e.moveNext())
        {
            var Contact = e.item();
            var status = Contact.Status;
            switch(status)
            {
                case 1:
                    status = "Offline";
                    break;
                case 3:
                    status = "Online";
                    break;
                case 4:
                    status = "Busy";
                    break;
                case 5:
                    status = "BRB";
                    break;
                case 6:
                    status = "Idle";
                    break;
                case 7:
                    status = "Away";
                    break;
                case 8:
                    status = "In A Call";
                    break;
                case 9:
                    status = "Eating";
                    break;
            }
            if(status == "Online")
            {
                ChatWnd.SendMessage("[N]" + Contact.Name + " is " + status + "[/N]");
            }
        }
    }
}
I'm trying to make a script to display my online contacts, and it works great but I don't know how to make a window come up with it or actually create a command so I used substring and SendMessage.
10-01-2009 05:37 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Creating a Command? - by Samo502 on 10-01-2009 at 05:37 PM
RE: Creating a Command? - by m0nst3rkill3r on 10-01-2009 at 05:41 PM
RE: Creating a Command? - by matty on 10-01-2009 at 05:44 PM
RE: Creating a Command? - by Samo502 on 10-01-2009 at 05:47 PM
RE: Creating a Command? - by matty on 10-01-2009 at 06:10 PM
RE: Creating a Command? - by Samo502 on 10-01-2009 at 06:12 PM
RE: Creating a Command? - by CookieRevised on 10-01-2009 at 06:36 PM
RE: Creating a Command? - by Samo502 on 10-01-2009 at 06:51 PM
RE: Creating a Command? - by CookieRevised on 10-01-2009 at 06:56 PM
RE: Creating a Command? - by matty on 10-01-2009 at 07:56 PM


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