4Eyes Posted March 1, 2010 Share Posted March 1, 2010 (edited) I have a small app that has no gui except for a systray icon. The systray icon has a tooltip to show the program rev and 1 menu option to exit. I'd like to use a timer to time loops instead of Sleep(), but I don't know how to derive the window handle of the tray icon, or if that's possible. Using the handle of the tray icon certainly doesn't work. Apart from creating an invisible window is there any way to do it? Hmmm... having tried to create an invisible GUI, I find I can't. Any clues on that one? Thanks. Edited March 1, 2010 by 4Eyes Link to comment Share on other sites More sharing options...
therks Posted March 1, 2010 Share Posted March 1, 2010 You can't create an invisible GUI? How visible is this: $gui = GUICreate('', 200, 200) While 1 $gm = GUIGetMsg() Switch $gm Case -3 ExitLoop EndSwitch WEnd My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 1, 2010 Moderators Share Posted March 1, 2010 4Eyes, Use the everpresent hidden AutoIt window: WinGetHandle(AutoitWinGetTitle()) 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...
4Eyes Posted March 2, 2010 Author Share Posted March 2, 2010 Well Rob, if you use GuiSetState() after GuiCreate() as I did while testing then it is indeed visible. I just did that without thinking, but now I've learned something. 4Eyes Link to comment Share on other sites More sharing options...
4Eyes Posted March 2, 2010 Author Share Posted March 2, 2010 Melba23, As per usual, a very helpful reply from you. Thanks. We've had discussions about the help file before, and having now looked up AutoItWinGetTitle(), I can say I would have been none the wiser about it had I not then looked up the related AutoItWinSetTitle() which states that 'The AutoIt window is usually hidden. The purpose of changing the title is to allow other programs (or other AutoIt scripts) to interact with AutoIt.' That makes sense and again, thanks to you I have learned something. Regards, 4Eyes 4Eyes, Use the everpresent hidden AutoIt window: WinGetHandle(AutoitWinGetTitle()) M23 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