Shoutbox

[request] window focus - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [request] window focus (/showthread.php?tid=86145)

[request] window focus by MeEtc on 09-25-2008 at 01:58 AM

I'd probably try making this myself if i had any idea on how to use the Windows API
What I'm looking for is a script for me to use when in a full screen app that will focus a chat window to the correct tab when a message is received (and/or open it if it is minimized), but not switch out of the full screen. Not sure if its possible or not, but who knows.

Reason for this, is that I have a second screen that usually holds chat windows on it. I have StuffPlug to flash the capslock key, but it doesn't show whats a person says when sending a message.

anyone up for the challenge?


RE: [request] window focus by MeEtc on 09-28-2008 at 02:40 AM

bumpage


RE: [request] window focus by SmokingCookie on 10-12-2008 at 11:14 AM

I'm not sure if JScript/MPL scripting is capable of doing this..

You might as well use DirectX to make windows "blend" into your 3D app (Got absolutely no idea how to do though)


RE: [request] window focus by tribbium on 08-02-2009 at 02:22 AM

Wow, I'm drudging up quite the old thread. But I think I've got a solution (hack) to your problem and I wanted to share =D

code:
function OnEvent_ChatWndReceiveMessage (ChatWnd, Origin, Message, MsgKind){
    if (Origin != Messenger.MyName){
        Interop.Call ("user32", "SetForegroundWindow", ChatWnd.Handle);
    }
}

I've tested it while watching a movie in fullscreen but not with Team Fortress 2 yet =P. The code is pretty straight forward, receive message set focus to that window. Tabs are actually windows of themselves to it'll switch to that tab. Based on experimental data, it will not overlap your fullscreen window.

Problems:

I don't know that it could detect that you are in fullscreen mode. You can probably implement an on/off button.

Receiving more than one message while in fullscreen mode will result in it flipping to the latest received message without identifying the other ones. There's probably a workaround you could write with a queue or something.