What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help: How to write code that hides system tray icon

Pages: (5): « First « 1 2 3 4 [ 5 ] Last »
Help: How to write code that hides system tray icon
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Help: How to write code that hides system tray icon
quote:
Originally posted by Black_Ice
Well you added in ur script:

code:
My.Status = My.Status


This keeps changing my status to 'away' after I come out of lock. During lock I have it set to go to 'away' but when I unlock it sets me as away and counts down from 15seconds...asking me if i'd like to personalise my status. Anyway I deleted this line in your code and all works well.

Guess it's no longer my script at all, you did it all.

"My.Status = My.Status" will do nothing more then triggering messenger to update its icon again. It will actually not set a new status since the new status is the same as the old; it will just trigger the routine which messenger does when a status is changed (aka it sets a new icon in the tray). If you remove that line, the icon in the system tray will not be restored properly anymore.

A side effect can indeed be if you have the personalised status window set to popup when a status is set to "away", that it will popup too.

As the comment in the script suggested it is a simple 'trick'. The whole script is meant to show that hiding the tray icon (and tooltip) can be done extremely easy without the need of -dt-'s class. Hence why I also didn't added the events Matty showed. The script only has the bare essentials. The rest (like this trick) is simply added to have something more complete to test it with. It was never intended to be a total perfect script. For that, you need the icon handles from Messenger itself and restore the icon yourself with the API. The 'status=status' trick is just a shortcut.

This post was edited on 08-19-2006 at 09:33 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-19-2006 09:31 AM
Profile PM Find Quote Report
Black_Ice
Junior Member
**


Posts: 26
33 / Male / –
Joined: Jun 2006
O.P. RE: Help: How to write code that hides system tray icon
Well then the stuff I added was nessisary to fix that glitch up with the 'away' thing popping up.
08-19-2006 09:47 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help: How to write code that hides system tray icon
tbh, the stuff you added didn't fixed it and even wouldn't work (see first comment in my previous post here). simply removing the 'status=status' line is a way better fix (which works) for this.

But to 'fix' it in a proper way you have to make a function which catches the icon handles and set the tray icon to the proper icon using that same API.

This post was edited on 08-19-2006 at 10:36 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-19-2006 10:35 AM
Profile PM Find Quote Report
Black_Ice
Junior Member
**


Posts: 26
33 / Male / –
Joined: Jun 2006
O.P. RE: Help: How to write code that hides system tray icon
It works for me, what part doesn't work for you if I may ask?
08-19-2006 10:41 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help: How to write code that hides system tray icon
Everything you added to the script in this post. Which I explained why it doesn't work in this post.

What is posted there will not work with you either. It will not work for anyone as that altered and added code of yours is full of bugs and doesn't make much sense either.


Nothing personal, but why are people not reading posts properly? *sigh*

This post was edited on 08-19-2006 at 12:02 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-19-2006 11:52 AM
Profile PM Find Quote Report
shrav/oo7`
Junior Member
**


Posts: 22
33 / Male / –
Joined: Aug 2006
RE: Help: How to write code that hides system tray icon
Just a question i dont change my status when i lock messenger and i dont have that personalised status pop-up box enabled either. is there some glitch that i need to clear up in the script if i use these options? Another thing is there are these lines in cookies script

// Main stuff: Change the tooltip to whatever you want
function ChangeTooltip(newtext) {
// Create the datablock structure (v2)
var NOTIFYICONDATA = Interop.Allocate(488);
// Fill in some needed parameters
with (NOTIFYICONDATA) {
WriteDWORD(0, NOTIFYICONDATA.Size); //DWORD cbSize
WriteDWORD(4, GetMSNHiddenWindowHandle()); //HWND  hWnd
WriteDWORD(8, 40046); //UINT  uID
WriteDWORD(12, NIF_TIP); //UINT  uFlags
WriteString(24, newtext.substring(0, 127), false); //WCHAR szTip[128]

it says change the tooltip to whatever you want, what if i dont want to change it, do I leave it as it is? It also says to fill in some needed parameters, what do i need to fill in and how do i do it. if there is also some other manual editing i need to do plz can you tell me. i am a total newbie to scripting but i get the general idea most of the time.
08-19-2006 01:22 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Help: How to write code that hides system tray icon
quote:
Originally posted by shrav/oo7`
Just a question i dont change my status when i lock messenger and i dont have that personalised status pop-up box enabled either. is there some glitch that i need to clear up in the script if i use these options?
READ the thread and the posts, all that has just been explained in previous 10 (or so) posts...

quote:
Originally posted by shrav/oo7`
Another thing is there are these lines in cookies script

// Main stuff: Change the tooltip to whatever you want
function ChangeTooltip(newtext) {
// Create the datablock structure (v2)
var NOTIFYICONDATA = Interop.Allocate(488);
// Fill in some needed parameters
with (NOTIFYICONDATA) {
WriteDWORD(0, NOTIFYICONDATA.Size); //DWORD cbSize
WriteDWORD(4, GetMSNHiddenWindowHandle()); //HWND  hWnd
WriteDWORD(8, 40046); //UINT  uID
WriteDWORD(12, NIF_TIP); //UINT  uFlags
WriteString(24, newtext.substring(0, 127), false); //WCHAR szTip[128]

it says change the tooltip to whatever you want, what if i dont want to change it
You don't use that function....

That function is to change the tooltip, if you don't want to change the tooltip, don't use that function :/

quote:
Originally posted by shrav/oo7`
It also says to fill in some needed parameters, what do i need to fill in and how do i do it.
Comments explain what is being done. If it says fill in some stuff it means the next lines will fill in some stuff.

quote:
Originally posted by shrav/oo7`
i am a total newbie to scripting but i get the general idea most of the time.
tbh, don't attempt to alter anything.

I don't want to be rude or anything but seeing your previous posts and stuff you first need to learn the basics of scripting and all (and also read posts more carefully). If you don't understand stuff don't use it... Sorry, but explaning every bit and angle of scripting and why something is done in this particular script and all without you understanding even the basics is seriously out of scope.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-19-2006 01:47 PM
Profile PM Find Quote Report
shrav/oo7`
Junior Member
**


Posts: 22
33 / Male / –
Joined: Aug 2006
RE: Help: How to write code that hides system tray icon
yeah i know i don't really know anything about scripting. well i suppose i should be fine as i am, i don't need to alter anything.
08-19-2006 01:53 PM
Profile PM Find Quote Report
Black_Ice
Junior Member
**


Posts: 26
33 / Male / –
Joined: Jun 2006
O.P. RE: Help: How to write code that hides system tray icon
Cookie, or anyone else for that matter...
It appears the code posted by Cookie will remove WLM icon but on unlock WLM crashes with a custom-like "report error to microsoft message." Can anyone confirm this? I'm using:

WLM Version: 8.0.0812.00
MP!L Version: 4.11.0.254

I have a hunch that it's WLM (hope this isn't a permanent problem! Wonder if it works in 8.1 Beta...) just wondering if anyone else has the same issues?

Thanks.
01-22-2007 01:00 PM
Profile E-Mail PM Find Quote Report
Pages: (5): « First « 1 2 3 4 [ 5 ] Last »
« 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