usera Posted September 23, 2011 Posted September 23, 2011 Greeting, I am looking for a HTML format form to get information. for example., I want user to input USERNAME, PASSWORD and DOMAIN information then click on GO button, my program continue, Right now I can get these 3 information each time I use msgbox command, how can I get in one time time HTML form? Thanks usera
sleepydvdr Posted September 23, 2011 Posted September 23, 2011 Do you mean something like this? #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 399, 129) $Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17) $Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17) $Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17) $inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21) $inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21) $inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21) $Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $userName = GUICtrlRead($inputUserName) $password = GUICtrlRead($inputPassword) $domain = GUICtrlRead($inputDomain) MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain) EndSwitch WEnd usera 1 #include <ByteMe.au3>
usera Posted September 23, 2011 Author Posted September 23, 2011 Do you mean something like this? #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 399, 129) $Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17) $Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17) $Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17) $inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21) $inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21) $inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21) $Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $userName = GUICtrlRead($inputUserName) $password = GUICtrlRead($inputPassword) $domain = GUICtrlRead($inputDomain) MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain) EndSwitch WEnd YES!!! Thank you very very much!
usera Posted September 26, 2011 Author Posted September 26, 2011 Thanks sleepydvdr, more question is how to show "*****" when some one typing in the password filed? and how to put a "About" button beside the "GO" button, for provide more information, thanks user Do you mean something like this? #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 399, 129) $Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17) $Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17) $Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17) $inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21) $inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21) $inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21) $Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $userName = GUICtrlRead($inputUserName) $password = GUICtrlRead($inputPassword) $domain = GUICtrlRead($inputDomain) MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain) EndSwitch WEnd
sleepydvdr Posted September 26, 2011 Posted September 26, 2011 Easy to fix. Just add to the top of the script: #Include <EditConstants.au3> And change this line: $inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21, $ES_PASSWORD) #include <ByteMe.au3>
usera Posted September 26, 2011 Author Posted September 26, 2011 Yes, that fixed. again thank you very much. How to put a "About" button beside the "GO" button, for provide more information, Thanks usera Easy to fix. Just add to the top of the script: #Include <EditConstants.au3> And change this line: $inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21, $ES_PASSWORD)
usera Posted September 26, 2011 Author Posted September 26, 2011 Yes, that fixed. again thank you very much. How to put a "About" button beside the "GO" button, for provide more information, Thanksusera figured out, thanks usera
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