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

Detect Minimized Window?
Author: Message:
macgyver08
Junior Member
**

Avatar
Hakuna matata!

Posts: 23
34 / Male / Flag
Joined: Feb 2007
O.P. Detect Minimized Window?
Is there a way to detect if a chat window is minimized and/or out of focus?

This post was edited on 08-14-2010 at 07:16 PM by macgyver08.
08-14-2010 07:13 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Detect Minimized Window?
JScript code:
if(Interop.Call("user32", "GetForegroundWindow") == ChatWnd.Handle){
// chatwnd is focused
} else {
// chatwnd is not focused
}


(not tested but should work) :P
[quote]
Ultimatess6
: What a noob mod
08-14-2010 11:11 PM
Profile PM Web Find Quote Report
macgyver08
Junior Member
**

Avatar
Hakuna matata!

Posts: 23
34 / Male / Flag
Joined: Feb 2007
O.P. RE: RE: Detect Minimized Window?
quote:
Originally posted by roflmao456
JScript code:
if(Interop.Call("user32", "GetForegroundWindow") == ChatWnd.Handle){
// chatwnd is focused
} else {
// chatwnd is not focused
}


(not tested but should work) :P

Thanks a lot!

I was confused at first, cause I replaced "user32" (with quotes) to the parameter "Origin" (without quotes), thinking user32 was the generic term you threw in there for any random person's chat window. But I googled it and found others using "user32.dll", so I used that, and it works! I don't know if only "user32" would've worked, I didn't try it lol.

anyway, thanks for helping me! :)
08-15-2010 02:30 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Detect Minimized Window?
User32.dll is the Dynamic Link Library (which is apart of windows) where the function GetForegroundWindow is found. There are others like kernel32.dll, gdi.dll etc. But each DLL has different exported functions you can use.
08-15-2010 02:51 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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