mesale0077 Posted November 15, 2009 Share Posted November 15, 2009 hi #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 375, 232, 192, 124) $Input1 = GUICtrlCreateInput("", 96, 32, 209, 21) $Input2 = GUICtrlCreateInput("", 96, 80, 209, 21) $Button1 = GUICtrlCreateButton("ok", 56, 160, 81, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("exit", 160, 160, 89, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("ınput111", 40, 32, 45, 17) $Label2 = GUICtrlCreateLabel("input222", 40, 80, 45, 17) $Button3 = GUICtrlCreateButton("help", 288, 168, 65, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $AD=GUICtrlRead($Input1) $ANA=GUICtrlRead($Input2) If stringlen($AD)=0 or stringlen($AD)=0 then msgbox(0,"please","Enter information") ;--------???????---->>>>>> $Input1 = GUICtrlCreateInput( or $Input2 = GUICtrlCreateInput( will control,If $Input1 = GUICtrlCreateInput or $Input2 = GUICtrlCreateInput ...empty, the process will not do ;$Input1 = GUICtrlCreateInput or $Input2 = GUICtrlCreateInput .. Was full of action will <<<<<----????-------- While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 msgbox(0,"ok","press") EndSwitch WEnd thank you Link to comment Share on other sites More sharing options...
Authenticity Posted November 16, 2009 Share Posted November 16, 2009 (edited) Please use this -> where posting AutoIt code. As much as I can understand, this:If stringlen($AD)=0 or stringlen($AD)=0perhaps should be:If stringlen($AD)=0 or stringlen($ANA)=0..but both will be empty as that is what you set them to.#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 375, 232, 192, 124) $Input1 = GUICtrlCreateInput("", 96, 32, 209, 21) $Input2 = GUICtrlCreateInput("", 96, 80, 209, 21) $Button1 = GUICtrlCreateButton("ok", 56, 160, 81, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("exit", 160, 160, 89, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("?nput111", 40, 32, 45, 17) $Label2 = GUICtrlCreateLabel("input222", 40, 80, 45, 17) $Button3 = GUICtrlCreateButton("help", 288, 168, 65, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $AD = GUICtrlRead($Input1) $ANA = GUICtrlRead($Input2) If StringLen($AD) = 0 Or StringLen($ANA) = 0 Then MsgBox(0, "please", "Enter information") ; do rest of OK job... MsgBox(0, "ok", "press") EndSwitch WEnd Edited November 16, 2009 by Authenticity Link to comment Share on other sites More sharing options...
mesale0077 Posted November 16, 2009 Author Share Posted November 16, 2009 like it #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> _Myname() Func _Myname() #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 375, 232, 192, 124) $Input1 = GUICtrlCreateInput("", 96, 32, 209, 21) $Input2 = GUICtrlCreateInput("", 96, 80, 209, 21) $Button1 = GUICtrlCreateButton("ok", 56, 160, 81, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("exit", 160, 160, 89, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("?nput111", 40, 32, 45, 17) $Label2 = GUICtrlCreateLabel("input222", 40, 80, 45, 17) $Button3 = GUICtrlCreateButton("help", 288, 168, 65, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $AD = GUICtrlRead($Input1) $ANA = GUICtrlRead($Input2) If StringLen($AD) = 0 Or StringLen($ANA) = 0 Then Myname() ; do rest of OK job... MsgBox(0, "ok", "press") EndSwitch WEnd EndFunc Func Myname() MsgBox(0, "please", "Enter information") GUIDelete() _Myname() EndFunc 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