What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Enumerate all windows.

[Help] Enumerate all windows.
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] Enumerate all windows.
js code:
var oWindows = {}

function __enum () {
    Interop.Call('user32', 'EnumWindows', Interop.GetCallbackPtr('EnumWindowsProc'), 0);
    for (var oWindow in oWindows) {
        Debug.Trace(oWindow+' : '+oWindows[oWindow]);
    }
}

function EnumWindowsProc(hWnd, lParam) {
    oWindows[hWnd] = GetWindowTitle(hWnd);
    return true;
}

function GetWindowTitle(hWnd) {
    var l = Interop.Alocate('user32', 'GetWindowTextLengthW', hWnd);
    var s = Interop.Allocate(l*2+2)
    Interop.Call('user32', 'GetWindowTextW', hWnd, s, l);
    return s.ReadString(0);
}
04-12-2009 01:26 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Enumerate all windows. - by Emblem on 04-12-2009 at 01:17 AM
RE: [Help] Enumerate all windows. - by matty on 04-12-2009 at 01:26 AM
RE: [Help] Enumerate all windows. - by Emblem on 04-12-2009 at 01:27 AM
RE: [Help] Enumerate all windows. - by matty on 04-12-2009 at 01:33 AM
RE: [Help] Enumerate all windows. - by Emblem on 04-12-2009 at 01:38 AM


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