t0ddie Posted July 10, 2005 Share Posted July 10, 2005 (edited) i have a gui thats one script, and i want to put that script into another script which is a gui as well, and the second script will open up when you click a button on the first script. so i was wondering what would be a good way to code this? because the way i coded it, the parent window closes as well when the close button is clicked on the "child" window, and nothing works on the "parent" window when the second window is open. i would like to make them both work without using a second script. i hope this basic question is understandable Edited July 10, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 11, 2005 Share Posted July 11, 2005 expandcollapse popup#include <GuiConstants.au3> $main = GUICreate("First GUI", 392, 322) $Button_1 = GUICtrlCreateButton("Input", 140, 190, 70, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 _SecondGUI() Case Else ;;; EndSelect WEnd Exit Func _SecondGUI() $S_GUI = GUICreate("Sencond GUI", 191, 85) $Input_1 = GUICtrlCreateInput("Input1", 0, 0, 180, 20) $Button_2 = GUICtrlCreateButton("OK", 60, 40, 60, 20) GUISetState() While 1 $msg2 = GUIGetMsg() Select Case $msg2 = $GUI_EVENT_CLOSE ExitLoop Case $msg2 = $Button_2 ExitLoop Case Else ;;; EndSelect WEnd GUIDelete($S_GUI) EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
t0ddie Posted July 11, 2005 Author Share Posted July 11, 2005 that works better, but heh, i close the first gui when the second one is open, and the second one closes. lol also, if i click "input" a second time, while the second window is up, it does not make another window. (meaning i think, that the first window isnt accepting input) i dont really want to make another window, but i was wondering if their was a way to make the first gui able to accept input and function normally while the second window is open. but this is still alot better than what i had. cool Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. 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