What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Some big help I need

Some big help I need
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: Some big help I need
quote:
Originally posted by ultimatebuster
Javascript code:
var CONTACTS = "johnsmith@hotmail.com, abcdefg@hotmail.com";
 
function OnEvent_Signin(Email){
    if (CONTACTS.indexOf(Email) != -1){
        if (!Messenger.MyContacts.GetContact(Email).Blocked) {
            Messenger.OpenChat(Email).SendMessage('Hi!);
        }
    }
}



If you want to check multiple contacts, you would be better off with an array.
Javascript code:
var Contacts = ["johnsmith@hotmail.com", "abcdefg@hotmail.com"];
 
function OnEvent_Signin(Email)
{
    for (var X in Contacts)
    {
        if (Contacts[X] === Email)
        {
            if (!Messenger.MyContacts.GetContact(Email).Blocked)
            {
                Messenger.OpenChat(Email).SendMessage("Hi!");
            }
            break;
        }
    }
}


PS: you also seemed to miss the end quote for the sent message.  :)
quote:
Originally posted by ultimatebuster
Javascript code:
Messenger.OpenChat(Email).SendMessage('Hi!);


07-09-2010 08:12 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Some big help I need - by SR01001010 on 07-08-2010 at 07:36 PM
RE: Some big help I need - by matty on 07-08-2010 at 07:39 PM
RE: Some big help I need - by ultimatebuster on 07-09-2010 at 02:36 AM
RE: Some big help I need - by whiz on 07-09-2010 at 08:12 AM
RE: Some big help I need - by Matti on 07-09-2010 at 12:55 PM
RE: Some big help I need - by SR01001010 on 07-09-2010 at 11:51 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