Wb-FreeKill Posted April 20, 2005 Share Posted April 20, 2005 How can i close the second GUI? #Include <GUIConstants.au3> GUICreate("GUI",200,200) $Button = GUICtrlCreateButton("GUI",30,30,70,20) GUISetstate() Func _GUI() $SecondGUI = GUICreate("Second GUI",200,200,100,100) GUISetBkColor (0x3D589C) GUISetState(@SW_SHOW) EndFunc While 1 $msg_array = GUIGetMsg(1) $msg = $msg_array[0] $winActive = $msg_array[1] If $msg = $Button Then _GUI() If ($msg = $GUI_EVENT_CLOSE) AND $winActive = $SecondGUI Then ;Close Second GUI? EndIf WEnd Link to comment Share on other sites More sharing options...
jpm Posted April 20, 2005 Share Posted April 20, 2005 How can i close the second GUI?#Include <GUIConstants.au3> GUICreate("GUI",200,200) $Button = GUICtrlCreateButton("GUI",30,30,70,20) GUISetstate() Func _GUI() $SecondGUI = GUICreate("Second GUI",200,200,100,100) GUISetBkColor (0x3D589C) GUISetState(@SW_SHOW) EndFunc While 1 $msg_array = GUIGetMsg(1) $msg = $msg_array[0] $winActive = $msg_array[1] If $msg = $Button Then _GUI() If ($msg = $GUI_EVENT_CLOSE) AND $winActive = $SecondGUI Then ;Close Second GUI? EndIf WEnd<{POST_SNAPBACK}>make $SecondGUI as a global variable and just GUIDelete($SecondGUI) Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 20, 2005 Author Share Posted April 20, 2005 make $SecondGUI as a global variable and just GUIDelete($SecondGUI) <{POST_SNAPBACK}>That simple Link to comment Share on other sites More sharing options...
jpm Posted April 20, 2005 Share Posted April 20, 2005 That simple <{POST_SNAPBACK}>Can you tell me why you cannot find it by yourself so I can improve the documentation if needed? Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 21, 2005 Author Share Posted April 21, 2005 Can you tell me why you cannot find it by yourself so I can improve the documentation if needed? <{POST_SNAPBACK}>Was that ironic or? Well i didn't know it had to be Global Link to comment Share on other sites More sharing options...
jpm Posted April 21, 2005 Share Posted April 21, 2005 Was that ironic or? Well i didn't know it had to be Global<{POST_SNAPBACK}>I am always serious. If somebody don't understand how to do something with the doc I want to know why.In your case it seems related to the AutoIt language.The way to pass info to a function is supposed to be known assuming you learn a little bit about computer language.We cannot insert in the doc this level of information so Forum is a right place(?) to ask question.Too basic one always hurts an information professional as I am. But you only answers can be silly not the questions. 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