KANlFUSA Posted August 19, 2015 Posted August 19, 2015 (edited) Hello to all . i am newbie nice to meet you all.how to write , when click cancel button , will exit inputbox return to gui (form1) and no continue run next inputbox. #include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>#include <Date.au3>#include <MsgBoxConstants.au3>#Region ### START Koda GUI section ### Form=Global $Form1 = GUICreate("Form1", 472, 164, 192, 124)Global $Button1 = GUICtrlCreateButton("Enter Data", 40, 40, 153, 65)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 EnterData() EndSwitch WEnd Func EnterData()Data1()Data2()EndFunc Func Data1()$Data1 = InputBox("Enter Data1","Please Enter Data","")If @Error = 1 then ExitEndIfMsgBox (0,"Data1","OK")EndFuncFunc Data2()$Data2 = InputBox("Enter Data2","Please Enter Data","")If @Error = 1 then ExitEndIfMsgBox (0,"Data2","OK")EndFunc Edited August 31, 2015 by KANlFUSA
KANlFUSA Posted August 19, 2015 Author Posted August 19, 2015 (edited) Edited August 19, 2015 by KANIFUSAGM
kylomas Posted August 19, 2015 Posted August 19, 2015 Change exit in your two data routines to "return".Kylomas KANlFUSA 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
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