What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » I've been thinking...

I've been thinking...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: I've been thinking...
Something I just wrote out.  Except it doesn't seem to detect all types of events.  Any ideas?
Javascript code:
// WLM Toasts - easily detect Messenger toasts
// By Whiz @ WhizWeb Community (http://www.portal-wwc.org.uk)
 
// Adapted from "MSN Popup Spy" by ".felipE" (http://felipex.net)
 
var Popups = []; // empty popup array
MsgPlus.AddTimer("WLMToastSearch", 100); // start a timer
 
function OnEvent_Timer(TimerId)
{
    if (TimerId === "WLMToastSearch")
    {
        var Popup = Interop.Call("user32", "FindWindowW", "msblpopupmsgwclass", 0); // attempt to find the window
        if (Popup && Popups[Popup.Handle] === undefined) // if it exists, and we haven't already dealt with it
        {
            var Length = Interop.Call("user32", "SendMessageA", Popup, 14, 0, 0); // get the length
            var String = ""; // start an empty string
            for (var Count = 0; Count < Length; Count++) // for each character of the length
            {
                String += " "; // add a space
            }
            Interop.Call("user32", "SendMessageW", Popup, 13, Length + 1, String); // get the actual message
            Debug.Trace("New WLM notification: \"" + String.replace(/\n/g, "") + "\" (handle: " + Popup.Handle + ")"); // add a debug message
            Popups[Popup.Handle] = String; // store the string and handle so that the toast isn't detected again
            // process "String" variable here
        }
        MsgPlus.AddTimer("WLMToastSearch", 100); // reset the timer
    }
}

03-17-2010 08:19 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
I've been thinking... - by whiz on 03-11-2010 at 08:26 PM
RE: I've been thinking... - by matty on 03-15-2010 at 12:54 PM
RE: I've been thinking... - by whiz on 03-17-2010 at 08:19 PM
RE: I've been thinking... - by Spunky on 03-17-2010 at 09:08 PM
RE: I've been thinking... - by whiz on 03-18-2010 at 07:04 PM
RE: I've been thinking... - by CookieRevised on 03-19-2010 at 11:29 AM
RE: I've been thinking... - by Matti on 03-19-2010 at 05:31 PM
RE: I've been thinking... - by Mnjul on 03-19-2010 at 06:38 PM
RE: I've been thinking... - by Spunky on 03-19-2010 at 06:43 PM
RE: I've been thinking... - by Mnjul on 03-19-2010 at 07:11 PM
RE: I've been thinking... - by Matti on 03-19-2010 at 07:16 PM
RE: I've been thinking... - by whiz on 03-19-2010 at 08:06 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