chazzmani Posted August 16, 2007 Posted August 16, 2007 As soon as I launch, the GUI blinks on teh screen for a brief moment and then disappears. Any ideas why? #NoTrayIcon #include <GUIConstants.au3> #include <Misc.au3> ;============================================ ; GUI Creation ;============================================ GUICreate("Color", 245, 462) GUICtrlCreateGroup("Colors", 0, 55, 245, 135) $Inputcolor = GUICtrlCreateInput("", 100, 75, 86, 20) GUICtrlCreateLabel("Color to look for", 9, 80, 83, 17) GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a precise match.", 30, 105, 179, 27) GUICtrlCreateLabel("Precise Fuzzy", 15, 167, 200, 13) $SensSlider = GUICtrlCreateSlider(20, 135, 180, 30) GUICtrlSetLimit(-1,20,1) GUICtrlSetData(-1,10) GUICtrlCreateGroup("", -99, -99, 1, 1) WinSetOnTop("Color", "", 1) GUISetState(@SW_SHOW) Thanks a bunch!
Generator Posted August 16, 2007 Posted August 16, 2007 Maybe... #NoTrayIcon #include <GUIConstants.au3> #include <Misc.au3> ;============================================ ; GUI Creation ;============================================ GUICreate("Color", 245, 462) GUICtrlCreateGroup("Colors", 0, 55, 245, 135) $Inputcolor = GUICtrlCreateInput("", 100, 75, 86, 20) GUICtrlCreateLabel("Color to look for", 9, 80, 83, 17) GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a precise match.", 30, 105, 179, 27) GUICtrlCreateLabel("Precise Fuzzy", 15, 167, 200, 13) $SensSlider = GUICtrlCreateSlider(20, 135, 180, 30) GUICtrlSetLimit(-1,20,1) GUICtrlSetData(-1,10) GUICtrlCreateGroup("", -99, -99, 1, 1) WinSetOnTop("Color", "", 1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend
Marc Posted August 16, 2007 Posted August 16, 2007 (edited) The GUI vanishes because the script ends after creating it. Add the following lines: While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edit: Darn, Generator beat me Edited August 16, 2007 by Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
chazzmani Posted August 16, 2007 Author Posted August 16, 2007 Maybe... #NoTrayIcon #include <GUIConstants.au3> #include <Misc.au3> ;============================================ ; GUI Creation ;============================================ GUICreate("Color", 245, 462) GUICtrlCreateGroup("Colors", 0, 55, 245, 135) $Inputcolor = GUICtrlCreateInput("", 100, 75, 86, 20) GUICtrlCreateLabel("Color to look for", 9, 80, 83, 17) GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a precise match.", 30, 105, 179, 27) GUICtrlCreateLabel("Precise Fuzzy", 15, 167, 200, 13) $SensSlider = GUICtrlCreateSlider(20, 135, 180, 30) GUICtrlSetLimit(-1,20,1) GUICtrlSetData(-1,10) GUICtrlCreateGroup("", -99, -99, 1, 1) WinSetOnTop("Color", "", 1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend THANKS!
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