Hi,I think the folowing code is from the Open notifier Beta 0.5 from nx01rules.googlepages.com/
Is still use this code because it stil works (i know it isn't reliable
)
I would like the popup that's created to show the contact's status aswel.
so it would be somethin like "Contact (Away) has opened a conversation/session with you."
I've tried by adding Contact.Status after contact.name
but it didn't work.
do you have to make a list with the name's of the status somewhere?
code:
var PluginObj;
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 + " 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;
}