What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Finding a window and stopping it from displaying

Finding a window and stopping it from displaying
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Finding a window and stopping it from displaying
Dunno if one can actually "block" windows, but you can indeed find it and close it:

JScript code:
function FindWindow(hWndParent,lpszClass,lpszWindow) {
    if(typeof hWndParent !== "number") hWndParent = 0;
    if(typeof lpszClass !== "string") lpszClass = 0; // NULL
    if(typeof lpszWindow !== "string") lpszWindow = 0; // NULL
    var hWndReturn = 0;
    do {
        hWndReturn = Interop.Call("User32.dll","FindWindowExW",hWndParent,hWndReturn,lpszClass,lpszWindpw);
    } while(hWndReturn !== 0)
    return hWndReturn;
}

function CloseWindow() {
    Interop.Call("User32.dll",
    "DestroyWindow",
    FindWindow(0 /* do you have a parent window? */,
        "WMP9MediaBarFlyout1342137C" /* I think it's the class name you're talking about? */));
}

Should work this way. Note that if "WMP9MediaBarFlyout1342137C" the window title (and not the class name), you need to send 0, 0 and WMP9MediaBarFlyout1342137C respectively.

This post was edited on 06-13-2009 at 02:32 PM by SmokingCookie.
06-13-2009 02:31 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Finding a window and stopping it from displaying - by ryxdp on 06-13-2009 at 07:39 AM
RE: Finding a window and stopping it from displaying - by SmokingCookie on 06-13-2009 at 02:31 PM
RE: Finding a window and stopping it from displaying - by TheSteve on 06-15-2009 at 05:02 AM
RE: Finding a window and stopping it from displaying - by SmokingCookie on 06-15-2009 at 06:23 AM
RE: Finding a window and stopping it from displaying - by ryxdp on 06-15-2009 at 07:15 AM
RE: RE: Finding a window and stopping it from displaying - by TheSteve on 06-15-2009 at 01:37 PM
RE: RE: RE: Finding a window and stopping it from displaying - by ryxdp on 06-16-2009 at 07:41 AM
RE: Finding a window and stopping it from displaying - by TheSteve on 06-17-2009 at 03:00 PM
RE: Finding a window and stopping it from displaying - by ryxdp on 06-18-2009 at 10:17 AM
RE: Finding a window and stopping it from displaying - by Mnjul on 06-18-2009 at 06:33 PM
RE: RE: Finding a window and stopping it from displaying - by ryxdp on 06-19-2009 at 07:33 AM
RE: Finding a window and stopping it from displaying - by CookieRevised on 06-19-2009 at 09:41 AM
RE: RE: Finding a window and stopping it from displaying - by ryxdp on 06-19-2009 at 10:00 AM
RE: Finding a window and stopping it from displaying - by CookieRevised on 06-19-2009 at 10:08 AM
RE: Finding a window and stopping it from displaying - by Matti on 06-19-2009 at 01:22 PM
RE: Finding a window and stopping it from displaying - by CookieRevised on 06-19-2009 at 10:41 PM
RE: RE: Finding a window and stopping it from displaying - by ryxdp on 06-19-2009 at 11:06 PM
RE: Finding a window and stopping it from displaying - by foaly on 06-20-2009 at 10:43 PM
RE: Finding a window and stopping it from displaying - by CookieRevised on 06-22-2009 at 06:22 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