jherazob Posted September 24, 2010 Share Posted September 24, 2010 Works great on XP, with a small caveat. I created 8 tray icons then killed their processes. But after doing so, the space they occupied was still reserved, so the result was a long and empty-looking systray Solved that one in a hurry by making a new tray icon for an instant then removing it, which forced the systray to resize (and in a script of yours that already has an icon in the taskbar the solution would be the inverse, TrayIconHide for a moment then back, letting your icon go away for an eyeblink). It'd still be great if the udf itself did that, but i'm fine with it as it is. Link to comment Share on other sites More sharing options...
aria Posted October 13, 2010 Share Posted October 13, 2010 (edited) Nice UDF, I just installed a UPS and its very cumbersome to catch the signal from the UPS software and thus script a graceful exit of running programs. Incredible as it sounds, the stupid UPS software simply shows balloon tips (aka tool tips) in the system tray (the manual claims to display dialog boxes, but there are no dialog boxes) So I am using this udf to check the tooltip message every few minutes. It works nicely, except that if the tooltip message changes - the old message continues to be captured, unless the mouse is physically moved over the icon in the tray :| I can manually write code to move the mouse to update the tooltip, but is there a better way to detect the updated tooltip message? If I must manually move the mouse, can someone please write example code using _SysTrayIconPos() in this UDF. Sorry, I dont know how to create a struct which will hold the (x,y) return value for this function. Thanks! Edited October 13, 2010 by aria Link to comment Share on other sites More sharing options...
wraithdu Posted October 13, 2010 Author Share Posted October 13, 2010 I find that interesting. I just tested on my Win7 x64 system with a volume monitoring script I have which changes the tooltip with volume adjustments. The UDF is correctly retrieving the updated tooltips. My guess is that your application is the culprit. Perhaps somehow it is not updating the tooltip until immediately before it is displayed by the mouseover? Link to comment Share on other sites More sharing options...
wraithdu Posted October 13, 2010 Author Share Posted October 13, 2010 Incidentally, I've made a correction in the UDF which allows a 32-bit AutoIt script to properly work on x64 windows. Link to comment Share on other sites More sharing options...
aria Posted October 14, 2010 Share Posted October 14, 2010 The UDF is correctly retrieving the updated tooltips. My guess is that your application is the culprit. Perhaps somehow it is not updating the tooltip until immediately before it is displayed by the mouseover?Perhaps you are right, this is the APC UPS software (APC Powerchute personal edition).Its a poor shoddy piece of work - one cant even navigate in their application with the keyboard (as in tabs, etc).I am using windows 2000 (yeah, old-timer If you could possibly tell me how to find the icon position using _SysTrayIconPos() , that would be wonderful!Thanks for replying! Link to comment Share on other sites More sharing options...
wraithdu Posted October 14, 2010 Author Share Posted October 14, 2010 You mean it's not clear from the function header? #include <_SysTray.au3> $pos = _SysTrayIconPos(0) ConsoleWrite("x: " & $pos[0] & ", y: " & $pos[1] & @CRLF) Link to comment Share on other sites More sharing options...
mamyte03 Posted January 13, 2011 Share Posted January 13, 2011 Do you know how to get icon pos (who is not visible on tray) from TrayNotifyWnd whan TrayNotifyWnd is opened. I need to get it to click on it and drag it to sTrayIconPos(0) ? Can you help? Link to comment Share on other sites More sharing options...
wraithdu Posted January 13, 2011 Author Share Posted January 13, 2011 You mean on Win7+ in the overflow window? See the below example. I also fixed a documentation issue in the UDF about the $iWin parameters. ; get the overflow window icon count $cnt2 = _SysTrayIconCount(2) ConsoleWrite($cnt2 & @CRLF) ; get icon positions, works even if window is hidden For $i = 0 To $cnt2 - 1 $pos = _SysTrayIconPos($i, 2) ConsoleWrite($pos[0] & " : " & $pos[1] & @CRLF) Next Link to comment Share on other sites More sharing options...
mamyte03 Posted January 13, 2011 Share Posted January 13, 2011 Thanks, you helped me a lot Link to comment Share on other sites More sharing options...
oren Posted May 25, 2011 Share Posted May 25, 2011 Thank you this is great.. I dont really understand what do I do with this ; Parameter(s): $iWin ; | 1 - ToolbarWindow32, Win2000+ ; | 2 - NotifyIconOverflowWindow, Win7+ Do i need to manually configure the program to work with windows 7 or windows xp??? Or do I make two different version of my program??? What is win200+ == windows xp - windows vista? and win7+ == windows7? Link to comment Share on other sites More sharing options...
wraithdu Posted May 25, 2011 Author Share Posted May 25, 2011 Depending what you need to do, and what OS's you are targeting, you need to do OS detection and possibly make a second call to your functions. In Win7+, the NotifyIconOverflowWindow is a new window containing the hidden-but-accessible tray icons. This window doesn't exist in older OS's. I suppose I could add the detection to the UDF, but maybe you only want to target one or the other location for Win7... I don't want to take away that choice. Link to comment Share on other sites More sharing options...
oren Posted May 28, 2011 Share Posted May 28, 2011 Question about _SysTrayIconRemove ... I have a program I made that run other program invisiable (exp.. It run 1.exe) and its working great with the use of _SysTrayIconRemove I can remove 1.exe trayIcon But after I exit the program and I want to start 1.exe manually and do see its trayicon its not possible and if I do want to see is try icon again I need to restart my computer... Is there anyway to fix it? Maybe running a systrayiconunremove of something:? Thank you P.S I tried sysiconhide.. And it working but the problem is that I use this Run(@ComSpec & " /c taskkill /F /PID " & $q & " /T", @SystemDir, @SW_HIDE) To kill 1.exe and then when I use it , It does not exit 1.exe systray and I end with 10 invisible systray Icons ... Thank you Link to comment Share on other sites More sharing options...
wraithdu Posted May 28, 2011 Author Share Posted May 28, 2011 Sounds like a problem with your 1.exe / invis tray icon. That function does nothing permanent, and I use it frequently when force killing programs, and the tray icons always reappear when I relaunch the apps. Link to comment Share on other sites More sharing options...
Ontosy Posted January 7, 2012 Share Posted January 7, 2012 (edited) I have several icons in the systray with pid and run the same and I can not tell them apart. The only thing that is the image distringue. you can get a list of bmp images of each icon in the systray ? Eventually I would like to be able to rearrange the icons in the systray under configured list via command line . Edited January 7, 2012 by Ontosy Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 7, 2012 Moderators Share Posted January 7, 2012 Ontosy, Take a look here - it looks like it might be the solution. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
sr71 Posted February 27, 2012 Share Posted February 27, 2012 Hi Wraithdu, A quick question -- where's the latest version of _SysTray UDF script? As you mentioned it's updated to support Win7 but I could not find the URL for downloading the scripts... Thanks Rick Link to comment Share on other sites More sharing options...
wraithdu Posted February 28, 2012 Author Share Posted February 28, 2012 Um, in the first post? Link to comment Share on other sites More sharing options...
MKANET Posted October 1, 2012 Share Posted October 1, 2012 wraithdu, I really appreciate the time you took to making this code. The provided example works perfectly right out of the box! All I did was build a x64 GUI exe. This utility is actually irriplacable; considering there are no compiled tiny, light-weight Win32/64 executables do this and that are currently available for download on the Internet. This should be a Windows "must-have" utility! Link to comment Share on other sites More sharing options...
masvil Posted December 5, 2012 Share Posted December 5, 2012 (edited) @wraithdu thanks for effort, your UDF is very useful for me too. I hope you'll add Win 8 support Edited December 5, 2012 by masvil Link to comment Share on other sites More sharing options...
WhiteLion Posted April 4, 2013 Share Posted April 4, 2013 Any way to refresh all trayicons to remove dead once form the tryiconarea ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now