BobiusMaximus Posted December 3, 2006 Share Posted December 3, 2006 I can't seem to find out which help file makes your GUI minimize down to the system try. Can anyone point me in the right direction? -Bob Photoshop User and Noob AutoIt user. Link to comment Share on other sites More sharing options...
Rick Posted December 3, 2006 Share Posted December 3, 2006 (edited) firstly, dont use #NoTrayIcon in your script but use AutoItSetOption ( "TrayIconHide",1) to not show icon in systray when gui is displayed as it will be on your taskbar anyway, then do a check for when minimised hide the gui (to take it away from the taskbar), and set AutoItSetOption ( "TrayIconHide",0) to reshow the icon in the systray , and then create a menu choice(if preferred) on the sytray icon to restore it. heres an example, its not perfect but i'll leave you to play with it #include <GUIConstants.au3> $Title="My GUI" $GUI=GUICreate($Title) GUISetState (@SW_SHOW) opt("TrayIconHide",1) Opt("TrayMenuMode",1) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop if TrayGetMsg() = -7 then ; if icon clicked ($TRAY_EVENT_PRIMARYDOWN) GUISetState(@SW_SHOW,$GUI) ; put back onto taskbar GUISetState(@SW_RESTORE,$GUI) ;restore what was minimised opt("TrayIconHide",1) ; hide systray icon endif if NOT WinActive("My GUI") then GUISetState(@SW_HIDE,$GUI) ; hide from taskbar opt("TrayIconHide",0) ; display systray icon TraySetToolTip($Title) ; icon title endif Wend Edited December 3, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
BobiusMaximus Posted December 3, 2006 Author Share Posted December 3, 2006 (edited) Interesting, it works, but I'm kinda confused as to how I add this into my own script. -Bob Edit: Nvm, I think I got it Edited December 3, 2006 by BobTheLeetHaxx0r Photoshop User and Noob AutoIt user. Link to comment Share on other sites More sharing options...
Rick Posted December 3, 2006 Share Posted December 3, 2006 put the script here and i'll have a go Who needs puzzles when we have AutoIt!! 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