What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script Snippit Examples?

Script Snippit Examples?
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Script Snippit Examples?
To continue on matty's post:

Since you already have the Email parameter passed to your OnEvent_Signin function, you can use that to get a Contact object for the contact who just signed in. We'll store that in a variable, such as "theContact". Then, we have a valid Contact object so we can use all of its functions and properties. The one we are interested in is the contact's name, so we make a variable "sName" to store the contact's display name in. From there, you can easily use the "sEmail" and "sName" to display a toast.
code:
function OnEvent_ContactSignin(sEmail){
    var theContact = Messenger.MyContacts.GetContact(sEmail);
    var sName = theContact.Name;
    MsgPlus.DisplayToastContact("Sign In","" + sName + "", "(" + sEmail + ")\nhas signed in.", "", "OnEvent_ToastClicked", sEmail);
}
Since you defined a callback function "OnEvent_ToastClicked" in that call, you might want to make such a function:
code:
function OnEvent_ToastClicked(sEmail) {
    //Do something useful here!
}
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

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

Messages In This Thread
Script Snippit Examples? - by Keikonium on 09-02-2008 at 11:22 PM
RE: Script Snippit Examples? - by Spunky on 09-02-2008 at 11:32 PM
RE: Script Snippit Examples? - by Keikonium on 09-02-2008 at 11:42 PM
RE: Script Snippit Examples? - by matty on 09-02-2008 at 11:56 PM
RE: Script Snippit Examples? - by Matti on 09-03-2008 at 11:09 AM
RE: Script Snippit Examples? - by Keikonium on 09-03-2008 at 11:19 AM
RE: Script Snippit Examples? - by Ezra on 09-03-2008 at 02:05 PM
RE: Script Snippit Examples? - by Keikonium on 09-03-2008 at 06:07 PM
RE: Script Snippit Examples? - by matty on 09-03-2008 at 06:21 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