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.