Help: How to write code that hides system tray icon - 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: Help: How to write code that hides system tray icon (/showthread.php?tid=61971) Help: How to write code that hides system tray icon by Black_Ice on 06-29-2006 at 02:08 AM
Hi All, RE: Help: How to write code that hides system tray icon by rob_botch on 06-29-2006 at 09:33 AM
You probably wouldn't be able to do that with a script. You might be able to try patching a Messenger .dll file, but that is not recommended or allowed. Alternatively, you could cheat and make a transparent icon (or one that blends into the system tray) and set that as the icon on locking. RE: Help: How to write code that hides system tray icon by Black_Ice on 06-29-2006 at 09:41 AM
Thanks for the reply. RE: Help: How to write code that hides system tray icon by rob_botch on 06-29-2006 at 09:43 AM Well.. perhaps you could use a script that runs one of these external programs, or another program with the capabilities to hide the icon. I would be very surprised if you could hide the icon directly from a script. RE: Help: How to write code that hides system tray icon by Black_Ice on 06-29-2006 at 09:45 AM Maybe not a script but a DLL or VB code RE: Help: How to write code that hides system tray icon by rob_botch on 06-29-2006 at 09:46 AM Yes, and then you could run this DLL or VB code from the script at certain points. RE: Help: How to write code that hides system tray icon by Black_Ice on 06-29-2006 at 09:47 AM
Yup, only problem now is finding the right VB code... RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-13-2006 at 04:21 AM Hey Black_Ice, i have found a partial solution to your problem. i myself used the Ultimate messenger lock alot, i can help you make the messenger icon dissappear, as in remove the icon but leave a space instead. go to the messenger plus! live preferences, click on the messenger tab, messenger lock. tick the checkbox that says "modify the systray icon" then click the icon, change the path to "C:\WINDOWS\system32\Shell32.dll,50" without the " and click ok. this will replace the messenger icon with a blank space every time you lock messenger. you might also want to disable the tooltip of the icon. RE: Help: How to write code that hides system tray icon by matty on 08-13-2006 at 04:45 AM
Look please refrain from posting in threads where you do not know the correct answer. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-13-2006 at 08:51 AM Thanks I'lll give it ago and alert you of any success. RE: RE: Help: How to write code that hides system tray icon by CookieRevised on 08-13-2006 at 09:26 PM
quote:This isn't true though... To be able to use this Shell_NotifyIcon API you don't need all the fancy stuff -dt- does in his class as that is a serious big unneeded detour. quote:IMHO, way too complicated and uses many really unneeded stuff. All you basically need is Shell_NotifyIcon API, nothing more and with that you can indeed change tooltips, remove icons, add icons, etc in only a few lines of codes (no need for hidden plus windows, enumerating icons, getting handles to icons, etc <= which is why -dt-'s script is seriously bloated IMHO): To remove the icon: code: to alter the tooltip, remove icon, readd icon, it is all similar and equally short... see attached script: edit: change some lines RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-14-2006 at 01:18 PM how do use your script to hide the messenger icon when we lock messenger? RE: Help: How to write code that hides system tray icon by Black_Ice on 08-14-2006 at 09:40 PM I'm working on that part but as of yet you can't. The code is just there but doesn't do anything yet. RE: Help: How to write code that hides system tray icon by hmaster on 08-14-2006 at 10:04 PM
quote:In the Plus! options just change the icon to one of the system icons But it would be cool to be able to hide it completely and have a shortcut to reopen RE: Help: How to write code that hides system tray icon by ecion on 08-14-2006 at 10:39 PM sorry if this is slightly off topic, but can other icons within Messenger be altered too? for example the the icon that appears in the very top-left corner of a chat window, along with icon displayed in the task bar when a chat is open? - Just wondering if they could be altered to the 'away/busy' icons when your contact is set to that status, could be quite useful. RE: Help: How to write code that hides system tray icon by matty on 08-15-2006 at 01:18 AM
quote: code: However doing this will cause you not to be able to get out of Messenger Lock unless you have a global shortcut to unlock it. RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 07:59 AM your script doesn't work. i want to remove the messenger icon and the space that it takes as well when i lock messenger. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 11:12 AM
You won't be able to unlock it unless you use a different key combination like matty mentioned. quote: RE: Help: How to write code that hides system tray icon by CookieRevised on 08-15-2006 at 11:14 AM
quote:add the two functions Matty showed. It works perfectly. PS: since Plus! can also change the icon, the only problem you may encounter is when you unlock messenger again since Plus! expects there to be an icon. Since it is not there Messenger might crash. Simply don't change the icon (untick that option in the preferences of messenger lock in Plus!) when you want it to be removed. quote:this has got nothing todo with the script or issue. Even without the script and any icon manipulation, you wont be able to use the same shortcut to lock and unlock; that's a basic (and understandeable) limitation of Plus!. However, what Matty said is something entirly else. He said that you wont be able to unlock messenger when you have choosen the option to double click on the system tray icon to unlock messenger. Very logical, since there isn't a tray icon anymore with this script, you also wont be able to double click on it. The only way to unlock messenger in that case is by using a shortcut. RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 11:42 AM it still doesnt work. just to make sure, i have to go to the MP! L preferences click on the scripts tab and create a new one, then i have to add matty's script over there and save it. i should then be able to lock messenger using my shortcut which is ctrl+space and the icon should disappear as well as the space. i should then be able to unlock messsenger using my unlock shortcut which is ctrl+alt+space, then i type in my messenger lock password and messenger should open up. i have unticked the option to modify the system icon like CookieRevised suggested. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 11:44 AM You must add Matty's code to the end of the script (at the bottom). RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 11:45 AM end of wat script? RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 11:47 AM You must add Matty's code to the end of the script posted by cookie RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 11:48 AM OOOOOOOHHH!! i was just putting matty's script there thanks alot well i suppose your problem is solved as well! RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 11:49 AM Yup, no problem RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 12:00 PM ok this isn't right. when i lock messenger the icon goes away then when i unlock it my icon doesn't come back, if i try locking it again it doesn't lock RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 12:03 PM Have you disabled the "change icon to" (has a picture of networking icon). You can't have this enabled. RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-15-2006 at 12:04 PM
yes i have i also disabled the remove tooltip option RE: Help: How to write code that hides system tray icon by Black_Ice on 08-15-2006 at 12:13 PM
You must Enable: RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-16-2006 at 08:12 AM ok i really feel stupid now. i was copying and pasting cookies script instead of downloading the file. just a little note you don't need to enable the change status option if you don't want to. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-17-2006 at 10:56 AM
Ok my script WAS working...then I tried making an xml to go with it. I created a new .js file and then Plus! wouldn't let me run the script saying that it's either 'defective' or I have 'limited rights'. I'm sure there's something in my script that I've overlooked... Anyway I deleted the .js file and moved the xml file out of the directory I was using. So the script is back to how it was when it was working...only that it's not working!! RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-17-2006 at 11:06 AM whoa, wats the problem the script works fine... just add mattys code to cookies code and it'll work fine. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-17-2006 at 11:07 AM I've added other stuff to it RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-17-2006 at 11:10 AM like wat? RE: Help: How to write code that hides system tray icon by Black_Ice on 08-17-2006 at 11:12 AM Like making it revert back to ur status to what it was before it went into lock. Cause when mines in lock it changes my status to 'away' so when I use matty's and cookie's script...when I unlock it says my status is 'away' RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-17-2006 at 11:19 AM anything else? RE: Help: How to write code that hides system tray icon by Black_Ice on 08-17-2006 at 11:20 AM
Not yet but will add in a later version: RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-17-2006 at 11:23 AM k keep working on it but for now i think cookies and mattys script is enough for me. thanks for your effort Black_Ice, Matty and CookieRevised RE: Help: How to write code that hides system tray icon by CookieRevised on 08-19-2006 at 09:12 AM
quote:You shouldn't tamper with that as Plus! itself is responsible for setting and resetting your status when you lock/unlock messenger. Also seeing your script, I really don't get why: 1) You use a timer to get the status 2 seconds after initialization and sign in. It makes no sense. 2) What you're trying todo with "var Status = DataBloc.ReadString(40);" DataBloc doesn't even exist in that function and it isn't declared anywhere 3) EDIT: "!===" isn't a valid comparisson operator. 4) EDIT: "False" isn't a valid boolean. 5) Don't change the comments I added. What you change it to is wrong: quote:The invisible window has not a space in the system tray: 1) the window will not add any space to the tray. 2) the window itself does have an icon. Which is exactly the whole point of that comment and that function. So please leave the comments intact, or at least don't add wrong stuff: quote: All you need is my code and implement it like Matty showed. Messenger Plus! itself will reset your status after an unlock anyways (if you have set it so to do this in the Plus! preferences). ------ To make a scriptpack there are some rules you need to apply to: 1) do not save your files in a subdirectory inside the zipfile (reason why your scriptpack doesn't work) 2) the scriptInfo.xml file must be in unicode (you did that) and need some basic xml headers (you didn't do that) <= this will not make your scriptpack not work, but it is not good practice what you did. Read the information regarding scriptpacks in the Plus! Scripting Help file. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-19-2006 at 09:17 AM
Well you added in ur script: code: 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. RE: RE: Help: How to write code that hides system tray icon by CookieRevised on 08-19-2006 at 09:31 AM
quote:"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. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-19-2006 at 09:47 AM Well then the stuff I added was nessisary to fix that glitch up with the 'away' thing popping up. RE: Help: How to write code that hides system tray icon by CookieRevised on 08-19-2006 at 10:35 AM
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. RE: Help: How to write code that hides system tray icon by Black_Ice on 08-19-2006 at 10:41 AM It works for me, what part doesn't work for you if I may ask? RE: Help: How to write code that hides system tray icon by CookieRevised on 08-19-2006 at 11:52 AM
Everything you added to the script in this post. Which I explained why it doesn't work in this post. RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-19-2006 at 01:22 PM
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 RE: RE: Help: How to write code that hides system tray icon by CookieRevised on 08-19-2006 at 01:47 PM
quote:READ the thread and the posts, all that has just been explained in previous 10 (or so) posts... quote: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:Comments explain what is being done. If it says fill in some stuff it means the next lines will fill in some stuff. quote: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. RE: Help: How to write code that hides system tray icon by shrav/oo7` on 08-19-2006 at 01:53 PM 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. RE: Help: How to write code that hides system tray icon by Black_Ice on 01-22-2007 at 01:00 PM
Cookie, or anyone else for that matter... |