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

Detecting things
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Detecting things
code:
var WindowPlacment = Interop.Allocate(48);

function OnEvent_Initialize(bMessengerStart){
    if (Messenger.ContactListWndHandle){
        _getPlacement(Messenger.ContactListWndHandle);
    }
}

function _getPlacement(hWnd){
    if (hWnd > 0){
        Interop.Call('user32', 'GetWindowPlacement', hWnd, WindowPlacement);
       
        Debug.Trace('> .showCmd : '+WindowPlacement.ReadDWORD(8));
        if (WindowPlacement.ReadDWORD(8) == 3){
            Debug.Trace(' > .showCmd : Maximized');
        } else if (WindowPlacement.ReadDWORD(8) == 2){
            Debug.Trace(' > .showCmd : Minimized');
        } else if (WindowPlacement.ReadDWORD(8) == 1){
            Debug.Trace(' > .showCmd : Opened');
        }
    } else {
        Debug.Trace(' > .showCmd : Closed');
    }
}

quote:
typedef struct _WINDOWPLACEMENT {
    UINT length;
    UINT flags;
    UINT showCmd;
    POINT ptMinPosition;
    POINT ptMaxPosition;
    RECT rcNormalPosition;
} WINDOWPLACEMENT;

This post was edited on 11-29-2006 at 10:47 PM by matty.
11-29-2006 10:32 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Detecting things - by Jimbo on 11-29-2006 at 07:51 PM
RE: Detecting things - by roflmao456 on 11-29-2006 at 09:32 PM
RE: Detecting things - by Spunky on 11-29-2006 at 10:14 PM
RE: Detecting things - by matty on 11-29-2006 at 10:32 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