This should do what you want it to do, though I haven't been able to test it when a contact opens a message I must say (all are either offline or I dont want to talk to them anyway
). I trust that part of the code anyway. I hope you like it. I must also add that this script does not show when they open a window with you but more when they send you a message which opens a window on your computer.
code:
var cont;
function OnEvent_ChatWndCreated(ChatWnd)
{
var ChatWndContacts = ChatWnd.Contacts;
if(ChatWndContacts.Count == 1)
{
var e = new Enumerator(ChatWndContacts);
var Contact = e.item();
cont = 1
MsgPlus.AddTimer('TimerId', '100')
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if (cont == 1)
{
MsgPlus.DisplayToastContact(Contact.Name ,"Opened a Chat Window With", Messenger.MyName ,"CHIMES.WAV");
cont = ''
}
}
function OnEvent_Timer(TimerId)
{
if (TimerId == "TimerId")
{
if (cont == 1)
{
var Windows = Messenger.CurrentChats;
var e = new Enumerator(Windows);
for(; !e.atEnd(); e.moveNext())
{
var ChatWnd = e.item();
var ChatWndContacts = ChatWnd.Contacts;
if(ChatWndContacts.Count == 1)
{
var e = new Enumerator(ChatWndContacts);
var Contact = e.item();
MsgPlus.DisplayToastContact(Messenger.MyName ,"Opened a Chat Window With", Contact.Name ,"CHIMES.WAV");
cont = ''
}
}
}
}
}
Hope it's what you were looking for.