What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] hide MSN Messenger from the task bar, while it remains in the system tray?

[request] hide MSN Messenger from the task bar, while it remains in the system tray?
Author: Message:
bungleMX
Full Member
***

Avatar

Posts: 135
Joined: May 2003
O.P. [request] hide MSN Messenger from the task bar, while it remains in the system tray?
when is gonna aout a version for Window Manager Plugin (Dock, Autohide) ?
or can someone make a script with an option to hide MSN Messenger from the task bar, while it remains in the system tray even maximized?
thanks

This post was edited on 06-26-2006 at 02:53 AM by bungleMX.
06-26-2006 02:52 AM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tray?
This was coded by Volv and edited by CookieRevised

code:
// Detect when the Contact List window has opened
function OnEvent_ContactListWndCreated() {
        // Hide the Contact List's taskbar item
        ShowInTaskbar(Messenger.ContactListWndHandle, false);
}


// Window Manipulation Module 2
// created by CookieRevised based upon Volv's code
function ShowInTaskbar(lngHandle, boolVisible) {
        var GWL_EXSTYLE = -20;
        var WS_EX_NOACTIVATE = 0x8000000;

        // Get the property
        // Very important, so we do not overwrite any other set style
        var CurrentExStyle = Interop.Call("User32", "GetWindowLongA", lngHandle, GWL_EXSTYLE);

        // Set the property
        if(boolVisible) {
                // Remove WS_EX_NOACTIVATE (using binary AND NOT operation)
                Interop.Call("User32", "SetWindowLongA", lngHandle, GWL_EXSTYLE, CurrentExStyle &~ WS_EX_NOACTIVATE);
        } else {
                // Set WS_EX_NOACTIVATE (using binary OR operation)
                Interop.Call("User32", "SetWindowLongA", lngHandle, GWL_EXSTYLE, CurrentExStyle | WS_EX_NOACTIVATE);
        }
}

The original thread is in beta testing so you can't see it. Simply create a new script, delete the default code and copy over this code.
06-26-2006 03:18 AM
Profile E-Mail PM Find Quote Report
bungleMX
Full Member
***

Avatar

Posts: 135
Joined: May 2003
O.P. RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste
quote:
The original thread is in beta testing so you can't see it. Simply create a new script, delete the default code and copy over this code.


woow thanks for that fast replay put i don't have any Idea of how to SIMPLY create a new script.
I'll search in the forum about how to make a new one, but I really apreciate if someone can do this in the simple way jeje 8-|
06-26-2006 04:23 AM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
Status: Online
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tray?
quote:
Originally posted by bungleMX
woow thanks for that fast replay put i don't have any Idea of how to SIMPLY create a new script.
I'll search in the forum about how to make a new one, but I really apreciate if someone can do this in the simple way jeje 8-|
That's easy :)

Open the Plus! configuration window -> Make sure that the selected tab on top is "General" (it should be anyway, since it's the default tab) -> On your left click Scripts -> Click New -> Enter any name for your script (it doesn't matter what name you enter) and then paste the code Matty gave you in the window that appears and click "Save All" ;)
YouTube closed-captions ripper (also allows you to download videos!)
06-26-2006 06:06 AM
Profile E-Mail PM Web Find Quote Report
Menthix
forum admin
*******

Avatar

Posts: 5537
Reputation: 102
39 / Male / Flag
Joined: Mar 2002
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tr
That script is very buggy, let me find a post about that...

EDIT: Found it:
quote:
Originally posted by MenthiX on the beta forum
Sorry for the doublepost, but I found a problem:

- Start WLM and make sure you have the NEW VERSION of "Hiding the Contact List" script running (the one modded by Cookie)
- Open a notepad window (any other window will work too, but this is the easiest to test with)
- Close WLM's contactlist (just close, don't shutdown)
- Open your contactlist again and drag it around. This should be smooth and contactlist should be on top of the notepad window
- Now click on the notepad window you have open to select it
- And after that go back to the contactlist again and drag it around again

... I have two problems when doing the last point:
- The position of the contactlist window only updates when I release the mouse button after dragging
- The contactwindow disappears under the notepad window when I drag the contactlist to it


Confirmed it with Sunshine and she said she already had simulair issues before.
quote:
Originally posted by Sunshine on the beta forum
Indeed Menthix, i was gonna ask Cookie about it but i have to go in a min.

The problem is the menu having difficulties regaining focus, it happens when you just click on desktop too (with contactlist still opened on desktop)...try select the menu..it will stay grayed out until you move the contactlist around a bit, hide/show menubar or open a conversation window (asif theres an invisible menu infront of the actual menu wich you can't click through that easily).

I still prefer the Cookie modified version over the original tho.

I would love a script like this too, but I stopped using this version because of the bug above.

This post was edited on 06-26-2006 at 06:10 AM by Menthix.
Finish the problem
Menthix.net | Contact Me
06-26-2006 06:08 AM
Profile E-Mail PM Web Find Quote Report
bungleMX
Full Member
***

Avatar

Posts: 135
Joined: May 2003
O.P. RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste
quote:
Originally posted by Mike
quote:
Originally posted by bungleMX
woow thanks for that fast replay put i don't have any Idea of how to SIMPLY create a new script.
I'll search in the forum about how to make a new one, but I really apreciate if someone can do this in the simple way jeje 8-|
That's easy :)

Open the Plus! configuration window -> Make sure that the selected tab on top is "General" (it should be anyway, since it's the default tab) -> On your left click Scripts -> Click New -> Enter any name for your script (it doesn't matter what name you enter) and then paste the code Matty gave you in the window that appears and click "Save All" ;)


OK I'll try at home
06-26-2006 07:43 PM
Profile PM Find Quote Report
bungleMX
Full Member
***

Avatar

Posts: 135
Joined: May 2003
O.P. RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste
quote:
Originally posted by MenthiX
That script is very buggy, let me find a post about that...

EDIT: Found it:
quote:
Originally posted by MenthiX on the beta forum
Sorry for the doublepost, but I found a problem:

- Start WLM and make sure you have the NEW VERSION of "Hiding the Contact List" script running (the one modded by Cookie)
- Open a notepad window (any other window will work too, but this is the easiest to test with)
- Close WLM's contactlist (just close, don't shutdown)
- Open your contactlist again and drag it around. This should be smooth and contactlist should be on top of the notepad window
- Now click on the notepad window you have open to select it
- And after that go back to the contactlist again and drag it around again

... I have two problems when doing the last point:
- The position of the contactlist window only updates when I release the mouse button after dragging
- The contactwindow disappears under the notepad window when I drag the contactlist to it


Confirmed it with Sunshine and she said she already had simulair issues before.
quote:
Originally posted by Sunshine on the beta forum
Indeed Menthix, i was gonna ask Cookie about it but i have to go in a min.

The problem is the menu having difficulties regaining focus, it happens when you just click on desktop too (with contactlist still opened on desktop)...try select the menu..it will stay grayed out until you move the contactlist around a bit, hide/show menubar or open a conversation window (asif theres an invisible menu infront of the actual menu wich you can't click through that easily).

I still prefer the Cookie modified version over the original tho.

I would love a script like this too, but I stopped using this version because of the bug above.


Thats sad, but I'll tryit anyway, this script is better than nothing jeje
06-26-2006 07:44 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tr
quote:
Originally posted by CookieRevised
(...)

PSS: From the msdn library:
quote:
"When you create a window, the taskbar examines the window’s extended style to see if either the WS_EX_APPWINDOW (0x40000) or WS_EX_TOOLWINDOW (defined as 0x80) style is turned on. If WS_EX_APPWINDOW is turned on, the taskbar shows a button for the window, and if WS_EX_ TOOLWINDOW is turned on, the taskbar does not show a button for the window. A window should never have both of these extended styles. If the window doesn't have either of these styles, the taskbar decides to create a button if the window is unowned and does not create a button if the window is owned."

(...)

From the MSDN library:
quote:
WS_EX_NOACTIVATE
Windows 2000/XP: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window.

To activate the window, use the SetActiveWindow or SetForegroundWindow function.

The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.


(...)

PS: For the current use in this script:

The showing and hiding of the window isn't needed at all since this function is called before the window is actually shown (as it is now). Setting the new position (as this is often required after a style change since many styles are cached and only read again when you at least set the position of the window (see msdn library again)) or even simply showing the window will be done already by WLM itself.

Also, the "If Then Else" isn't really needed for this script of course, as you will always call the function with the parameter 'false' anyways.


(...)

quote:
Originally posted by CookieRevised
I know about this though, but don't consider it a bug but a known limitation (:p) because as was stated:



It is simply because of WS_EX_NOACTIVATE. If there is a way (event) to know when the user clicks the window, you could call the SetForegroundWindow or SetActiveWindow API....

There is probably a workaround (eg: by simply making a hidden window as the owner of the contactlist, or etc...), but I haven't the time atm to make it. (Ideally you manipulate the taskbar itself and leave the contactlist window totally alone; has probably the advantage that WLM will still be shown in the alt-tab list too)

This post was edited on 06-26-2006 at 07:51 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-26-2006 07:47 PM
Profile PM Find Quote Report
bungleMX
Full Member
***

Avatar

Posts: 135
Joined: May 2003
O.P. RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste
quote:
Originally posted by Mike
quote:
Originally posted by bungleMX
woow thanks for that fast replay put i don't have any Idea of how to SIMPLY create a new script.
I'll search in the forum about how to make a new one, but I really apreciate if someone can do this in the simple way jeje 8-|
That's easy :)

Open the Plus! configuration window -> Make sure that the selected tab on top is "General" (it should be anyway, since it's the default tab) -> On your left click Scripts -> Click New -> Enter any name for your script (it doesn't matter what name you enter) and then paste the code Matty gave you in the window that appears and click "Save All" ;)


IT WORKS!!!!!!!
Perfect, I don't care about the minimize thing becouse I allways use the close button to leave my taskbar clean, thanks to all of you...
thanks Matty!
I really apreciate this.. 100%
06-27-2006 01:55 AM
Profile 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