timsta97 Posted August 6, 2009 Posted August 6, 2009 With InputBox() how can I read the user's input even if the cancel button is pushed.
Manjish Posted August 6, 2009 Posted August 6, 2009 (edited) With InputBox() how can I read the user's input even if the cancel button is pushed. You can create your own inputbox and implement this function.. Like this: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AutoIT Input Box", 288, 182, 193, 125) $IP = GUICtrlCreateInput("", 24, 112, 217, 21) $prompt = GUICtrlCreateLabel("", 56, 48, 4, 4) $OK = GUICtrlCreateButton("OK", 32, 144, 73, 25, 0) $Cancel = GUICtrlCreateButton("Cancel", 144, 145, 73, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Cancel MsgBox(4096,"",guictrlread($IP)) Exit Case $OK MsgBox(4096,"",guictrlread($IP)) EndSwitch WEnd Edited August 6, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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