Gui Posted November 18, 2009 Share Posted November 18, 2009 Hey guys, I've tried so many things and functions, and still NO LUCk! I need to know how you can minimize to tray, even inside a loop, and still continue that loop whilst minimized to tray. I have just regular minimizing to tray down, but there's no loop involved. So basically, there will be a loop running. Now during that loop, if a button is pressed 'Minimize to Tray', then it will minimize to tray and still continue the loop. ex() expandcollapse popup#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #NoTrayIcon #Include <Constants.au3> Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) Opt("TrayIconHide", 0) TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"SpecialEvent") TraySetState() GUICreate ( GUI SHIT ) $start = GUICtrlCreateButton('start') $mtray = GUICtrlCreateButton('Minimize to tray') GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $mtray TraySetIcon("C:\Documents and Settings\Dell Customer\Desktop\Desktop Items\zeroicon.ico") GuiSetState(@SW_HIDE) TraySetState(1); show TraySetToolTip ("Youtube Viewer - Click to Restore.") Case $msg = $start start() EndSelect Wend Func start() For 1 To 10 ; this the the loop... ;bla bla... ; Now if minimize to tray button is pressed, it should minimize to tray, and still continue this loop.. Next EndFunc Link to comment Share on other sites More sharing options...
whim Posted November 18, 2009 Share Posted November 18, 2009 (edited) You might want to hotkey your minimise to tray code with HotKeySet HTH, whim Edited November 18, 2009 by whim 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