1bobby Posted March 26, 2008 Posted March 26, 2008 Not sure if this can be done at least I have not found it yet, but it is running on several of my scripts and I would like to remove it! Once information has been entered into a GUI (Form1) and you get out of the loop, is there anyway to close or remove the Form1 window from the screen while the data is validated.. Then if the input data is bad, re-open the screen as a do over with the original Form1 window displaying the data that was input by the user so they can change/correct it?? Seems like I run the whole script with the original Form1 screen in back of the running Windows Thanks bobby
Swift Posted March 26, 2008 Posted March 26, 2008 (edited) You mean: GUIDelete($Form1) Or To Hide: GUISetState(@SW_HIDE, $Form1) Or To Show: GUISetState(@SW_SHOW, $Form1) Hope that helps! Edited March 26, 2008 by R6V2
1bobby Posted March 27, 2008 Author Posted March 27, 2008 When I try the three suggestions, although seems like they should work anywhere out of the loop, I get "C:\Documents and Settings\bobbyb\Desktop\EOC\EOC Menu.au3(58,31) : ERROR: $Form1_1: undeclared global variable." I did put them in the first function after the loop thinking I wouldn't need it anymore. Maybe I am just not using them in the correct location? bb
i542 Posted March 27, 2008 Posted March 27, 2008 (edited) #include <GUIConstants.au3> $MyGUI = GUICreate("My GUI", 294, 70, 193, 159) GUICtrlCreateLabel("Enter ""autoit"" in input box located down!", 7, 10, 205, 17) $input = GUICtrlCreateInput("", 8, 35, 186, 21) $ok = GUICtrlCreateButton("ok", 202, 36, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ok GuiSetState(@SW_HIDE, $MyGUI) ;Hides the window while data is processed Sleep(500) ;We want to get impression as something is doing, right? ;) If GuiCtrlRead($input) <> "autoit" Then GuiSetState(@SW_SHOW, $MyGUI) ;Show GUI again if user didn't enter AutoIt Else MsgBox(0, "", "Waay to goooo! You did it!") Exit EndIf EndSwitch WEnd Edited March 28, 2008 by i486 I can do signature me.
1bobby Posted March 28, 2008 Author Posted March 28, 2008 That is one the belongs in the examples, Thank you so much worked really cool and is surly a help to us newbies.
i542 Posted March 28, 2008 Posted March 28, 2008 That is one the belongs in the examples, Thank you so much worked really cool and is surly a help to us newbies.You're welcome. (Well, this is actually first time I get "thank you" PM from somebody...) I can do signature me.
Swift Posted March 28, 2008 Posted March 28, 2008 You're welcome. (Well, this is actually first time I get "thank you" PM from somebody...)I get a few of those, some of the newbies that have small questions, but don't really want a topic for it, PM me, and I PM back.
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