What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need some help with script

Need some help with script
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Need some help with script
That code could be simplified even further. Look what I found in the documentation!
quote:
Contacts::GetContact
Return Value: A Contact object if the contact is found in the object's list, null otherwise.
You don't even need a loop to check whether that e-mail address is in the list of chat window contacts, just check that Contacts.GetContact(sIgnoredEmail) is not null! Even better, you don't need that flag variable at all, just put that expression straight in the if-condition! :D
Javascript code:
    // check whether the ignored contact is in this chat
    if (oChatWnd.Contacts.GetContact('gregorsturm12@hotmail.com') !== null) {
        // send a message if the contact was found
        oChatWnd.SendMessage('You are ignored');
    }

Pretty nifty, uh? :P

This post was edited on 02-11-2010 at 09:00 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-11-2010 09:00 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need some help with script - by Barathrum on 02-11-2010 at 07:45 PM
RE: Need some help with script - by Mnjul on 02-11-2010 at 07:51 PM
RE: Need some help with script - by Barathrum on 02-11-2010 at 08:31 PM
RE: Need some help with script - by matty on 02-11-2010 at 08:44 PM
RE: Need some help with script - by Matti on 02-11-2010 at 09:00 PM
RE: Need some help with script - by matty on 02-11-2010 at 09:12 PM
RE: Need some help with script - by Barathrum on 02-12-2010 at 11:59 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