What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Toast Box Help

Toast Box Help
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Toast Box Help
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 :P).  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. :)
[Image: markee.png]
07-20-2006 01:02 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Toast Box Help - by Vexor on 07-20-2006 at 11:03 AM
RE: Toast Box Help - by markee on 07-20-2006 at 11:20 AM
RE: Toast Box Help - by ddunk on 07-20-2006 at 11:21 AM
RE: Toast Box Help - by Vexor on 07-20-2006 at 11:29 AM
RE: Toast Box Help - by ddunk on 07-20-2006 at 11:32 AM
RE: Toast Box Help - by Vexor on 07-20-2006 at 11:33 AM
RE: Toast Box Help - by markee on 07-20-2006 at 11:39 AM
RE: Toast Box Help - by Vexor on 07-20-2006 at 11:53 AM
RE: Toast Box Help - by markee on 07-20-2006 at 01:02 PM
RE: Toast Box Help - by Vexor on 07-20-2006 at 01:24 PM
RE: Toast Box Help - by markee on 07-20-2006 at 01:38 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