NegativeNrG Posted March 18, 2006 Posted March 18, 2006 ok, i need help again . Problem: When i Click a Button, it will bring up another GUI, then when i click the button on That Opened GUI, it will delete The Opened GUI, BUT when i click the Button again(to bring up the GUI) it won't work. Example: expandcollapse popup#include <GUIConstants.au3> ;Test $Form1 = GUICreate("WIndow 1", 529, 358, 192, 125) $Edit1 = GUICtrlCreateEdit("", 16, 16, 257, 201, -1, $WS_EX_CLIENTEDGE) GUICtrlSetData($Edit1, "AEdit1") $Button1 = GUICtrlCreateButton("Window 2", 344, 32, 65, 33) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop CAse $msg = $Button1 _showgui() Case Else ;;;;;;; EndSelect WEnd Func _showgui() #include <GUIConstants.au3> ; == GUI generated with Koda == $Form2 = GUICreate("WIndow 2", 313, 112, 192, 125) GUICtrlCreateLabel("WHAT KEY?", 40, 16, 67, 17) $Input1 = GUICtrlCreateInput("AInput1", 40, 40, 185, 21, -1, $WS_EX_CLIENTEDGE) $Buttonset = GUICtrlCreateButton("Set", 80, 72, 49, 33) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Buttonset GUIctrlsetdata($Edit1,GUIctrlread($Edit1) & @CRLF & GUIctrlread($Input1)) GUIdelete($Form2) Case Else ;;;;;;; EndSelect WEnd EndFunc [size=20]My File Upload[/size]Register at my site and upload.
GaryFrost Posted March 18, 2006 Posted March 18, 2006 expandcollapse popup#include <GUIConstants.au3> ;Test $Form1 = GUICreate("WIndow 1", 529, 358, 192, 125) $Edit1 = GUICtrlCreateEdit("", 16, 16, 257, 201, -1, $WS_EX_CLIENTEDGE) GUICtrlSetData($Edit1, "AEdit1") $Button1 = GUICtrlCreateButton("Window 2", 344, 32, 65, 33) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 _showgui() Case Else ;;;;;;; EndSelect WEnd Func _showgui() #include <GUIConstants.au3> ; == GUI generated with Koda == $Form2 = GUICreate("WIndow 2", 313, 112, 192, 125) GUICtrlCreateLabel("WHAT KEY?", 40, 16, 67, 17) $Input1 = GUICtrlCreateInput("AInput1", 40, 40, 185, 21, -1, $WS_EX_CLIENTEDGE) $Buttonset = GUICtrlCreateButton("Set", 80, 72, 49, 33) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Buttonset GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & @CRLF & GUICtrlRead($Input1)) ExitLoop Case Else ;;;;;;; EndSelect WEnd GUIDelete($Form2) EndFunc ;==>_showgui SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
NegativeNrG Posted March 18, 2006 Author Posted March 18, 2006 Oh ok, Thanks. [size=20]My File Upload[/size]Register at my site and upload.
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