silvano Posted August 24, 2007 Share Posted August 24, 2007 hi, i have one script that create a lot of controls: input, button etc... and set all, after creation to $GUI_HIDE but when i run the GUI i watch the creation and the setstate GUI_HIDE for a few seconds can i mask this creation? tks Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 24, 2007 Share Posted August 24, 2007 hi,i have one script that create a lot of controls: input, button etc...and set all, after creation to $GUI_HIDE but when i run the GUIi watch the creation and the setstate GUI_HIDE for a few secondscan i mask this creation?tksThat doesn't make any sense. When you create a GUI it is hidden and disabled until you change that with GuiSetState(). If you are adding controls to an existing GUI, you just hide it first while working on it. Find the GuiSetState() right after the GuiCreate() and move it down to after you create the controls... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
silvano Posted August 24, 2007 Author Share Posted August 24, 2007 sorry... first I create a GUICtrlCreatePic and display GUI with GUISetState(@SW_SHOW) when i press enter hide a pic and create controls(hide) in order: GUICreate $logo = GUICtrlCreatePic() GUISetState(@SW_SHOW) Global $avvia = 0 ; func {ENTER} While $avvia < 1 Sleep(100) WEnd GUICtrlSetState($logo,$GUI_HIDE) ; the controls $cerca = GUICtrlCreateButton("Cerca",520,150,80,30) GUICtrlSetState(-1,$GUI_HIDE) ;etc... can i mask the controls creation? Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 24, 2007 Share Posted August 24, 2007 You're not listening... can't you hear me yelling at my monitor! Well, not really. Your GuiCreate is bogus because it doesn't have the parens and the minimum title parameter. And I clearly pointed out that you have to move that GUISetState(@SW_SHOW) that is now line 3 of your code to AFTER all the controls are created.Once your code creates and shows the GUI, nothing else happens anyway because your script is trapped in the While loop forever, so it never reaches the controls anyway.Try posting some working code... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
silvano Posted August 25, 2007 Author Share Posted August 25, 2007 You're not listening... can't you hear me yelling at my monitor! Well, not really. Your GuiCreate is bogus because it doesn't have the parens and the minimum title parameter. And I clearly pointed out that you have to move that GUISetState(@SW_SHOW) that is now line 3 of your code to AFTER all the controls are created. Once your code creates and shows the GUI, nothing else happens anyway because your script is trapped in the While loop forever, so it never reaches the controls anyway. Try posting some working code... sorry, I have trim the code ... #include <GUIConstants.au3> HotKeySet("{ENTER}", "__avvia") Func __avvia() $avvia = 1 Return $avvia EndFunc GUICreate("test", 250, 150, -1, -1, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_SYSMENU,$WS_GROUP,$WS_TABSTOP), BitOR($WS_EX_APPWINDOW,$WS_EX_OVERLAPPEDWINDOW,$WS_EX_WINDOWEDGE)) $destination = @Systemdir & "\oobe\images\mslogo.jpg" $logo = GUICtrlCreatePic($destination, 0, 0, 750, 570) GUISetState(@SW_SHOW) Global $avvia = 0 While $avvia < 1 Sleep(100) WEnd GUICtrlSetState($logo,$GUI_HIDE) GUICtrlCreateLabel("test",50,50,200,20) GUICtrlSetState(-1,$GUI_HIDE) While 1 $nsg = GUIGetMsg() Switch $nsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd this is the short example but i have many controls in the gui... and now I have resolved with splashImageOn() func before the gui creation 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