sulfurious Posted September 14, 2006 Share Posted September 14, 2006 I have not found the thread for this, if it exists. I have a GUI. Some buttons. Press a button, and some parsing starts to happen. At some point in the parsing, I can msgbox a choice to do something with a particular line of parse. To give it more options, I made a 2nd GUI, hidden at inception. Now, when I am in a for next loop, and I come across this decision spot, how do I call the 2nd GUI into play. I am using OnEvent mode. If I call a function to show the 2nd GUI, I need that function to stay open and not return. So I use a While loop. But, that effectively kills any button clicking on the 2nd GUI. Or, I just show the 2nd GUI from the decision spot, but once again, I need to leave that routine and go into another. The only way I know of to stop the current loop and go into another is make it idle there. With some kind of a loop. I think the function call holds the most promise. I made the 2nd GUI create in a function, but it still accepts no user action. How can this be achieved? late, Sul Link to comment Share on other sites More sharing options...
SxyfrG Posted September 12, 2008 Share Posted September 12, 2008 (edited) Without seeing any of your code, this is what i can suggest: Before the For Next loop, disable OnEventMode and create the GUI with the controls and such. Then when the gui is needed within the For Next loop, "call it into play" but showing it (duh ) and have a While Wend loop within your for next loop to handle anything like that. E.g. $Opt = Opt("GUIOnEventMode", 0) ;Create GUI and controls here For $i = 1 To $Var ; do your stuff here If $Somethinghappened Then GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $A_Button ;do stuff Case $Another_Button ;do stuff Case -3 ;close button ExitLoop EndSwitch WEnd EndIf ;continue doing stuff if needed Next Opt("GUIOnEventMode", $Opt) That *should* work, didn't test it though >_< *EDIT* Didn't see this was 2 years old, hope it can still help though Edited September 12, 2008 by SxyfrG My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website Link to comment Share on other sites More sharing options...
crash748 Posted September 29, 2008 Share Posted September 29, 2008 *EDIT* Didn't see this was 2 years old, hope it can still help though lol That was exactly what i'm trying to do! Thanks SxyfrG 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