[request] hide MSN Messenger from the task bar, while it remains in the system tray? - 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] hide MSN Messenger from the task bar, while it remains in the system tray? (/showthread.php?tid=61483)
[request] hide MSN Messenger from the task bar, while it remains in the system tray? by bungleMX on 06-26-2006 at 02:52 AM
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
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tray? by matty on 06-26-2006 at 03:18 AM
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.
RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste by bungleMX on 06-26-2006 at 04:23 AM
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
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tray? by Mike on 06-26-2006 at 06:06 AM
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
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"
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tr by Menthix on 06-26-2006 at 06:08 AM
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.
RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste by bungleMX on 06-26-2006 at 07:43 PM
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
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
RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste by bungleMX on 06-26-2006 at 07:44 PM
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
RE: [request] hide MSN Messenger from the task bar, while it remains in the system tr by CookieRevised on 06-26-2006 at 07:47 PM
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 () 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)
RE: RE: [request] hide MSN Messenger from the task bar, while it remains in the syste by bungleMX on 06-27-2006 at 01:55 AM
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
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%
|