What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] retrieve contact status

[?] retrieve contact status
Author: Message:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [?] retrieve contact status
code:
var PluginObj;
Status = new Array('Unknown', 'Offline', 'Unknown', 'Online', 'Busy', 'Be Right Back', 'Idle', 'Away', 'In a Call', 'Out to Lunch');

function OnEvent_Initialize(MessengerStart)
{
    if ( PluginObj == null )
    {
        OnEvent_Signin(Messenger.MyEmail);
    }
}

function OnEvent_Uninitialize(MessengerExit)
{
    PluginObj = null;
}

function SetWindowText(hWnd, sText)
{
    Interop.Call('user32', 'SetWindowTextW', hWnd, sText);
}

function OnWndOpenedEvent_EditTextChanged(PlusWnd,ControlId)
{
    if ( PlusWnd.GetControlText(ControlId) != "" )
    {
        var Contacts = Messenger.MyContacts;
        var Contact = Contacts.GetContact(PlusWnd.GetControlText(ControlId));
        if ( Contact == null )
        {
            MsgPlus.DisplayToast("Window Opened", PlusWnd.GetControlText(ControlId) + " has opened a conversation with you.", "", "ToastCallback", PlusWnd.GetControlText(ControlId));
        }
        else
        {
            MsgPlus.DisplayToast("Window Opened", Contact.Name + "("+Status[Contact.Status]+ ")" + " has opened a conversation with you.", "", "ToastCallback", Contact.Email);
        }
        PlusWnd.SetControlText(ControlId, "");
    }
}

function ToastCallback(Param)
{
    Messenger.OpenChat(Param);
}

function LoadPlugin_VB(ProgId, CurrentEmail, OpenTextControlhWnd)
{
    PluginObj = new ActiveXObject(ProgId);
    if(PluginObj)
    {
        if(PluginObj.Initialize(8, CurrentEmail + "|" + OpenTextControlhWnd, undefined) == false)
        {
            MsgPlus.DisplayToast("Open Notifier", "Notifier was unable to load for an unknown reason");
        }
    }
}

function OnEvent_Signin(Email)
{
    var pOpenWindow = MsgPlus.CreateWnd("Opened.xml","WndOpened",1);
    SetWindowText(pOpenWindow.Handle, Email + "MSGPLNOTIFOPEN");

    LoadPlugin_VB("MSNWON.WindowNotifier", Email, pOpenWindow.GetControlHandle("Edt1"), 0);
}

function OnEvent_Signout(Email)
{
    PluginObj = null;
}
Edited

This post was edited on 12-08-2006 at 10:58 AM by Felu.
12-08-2006 10:45 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] retrieve contact status - by Cartox on 12-08-2006 at 10:12 AM
RE: [?] retrieve contact status - by Felu on 12-08-2006 at 10:25 AM
RE: [?] retrieve contact status - by Cartox on 12-08-2006 at 10:39 AM
RE: [?] retrieve contact status - by Felu on 12-08-2006 at 10:45 AM
RE: [?] retrieve contact status - by Cartox on 12-08-2006 at 10:57 AM
RE: [?] retrieve contact status - by NanaFreak on 12-08-2006 at 10:58 AM
RE: [?] retrieve contact status - by Cartox on 12-08-2006 at 11:07 AM
RE: [?] retrieve contact status - by Felu on 12-08-2006 at 11:19 AM
RE: [?] retrieve contact status - by Cartox on 12-08-2006 at 11:23 AM
RE: [?] retrieve contact status - by Felu on 12-08-2006 at 11:42 AM
RE: [?] retrieve contact status - by Cartox on 12-08-2006 at 12:23 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