Ysengrim Posted November 5, 2007 Share Posted November 5, 2007 I want 2 inputs from users using inputbox for asking name and pasword i can use the command twice but then the screen refresh is it possible to see both textinputs in the same window? $Name = InputBox("Titel","Input Name : ,"","",325,125) $Code = InputBox("Titel","Input Code : ,"","",325,125) before you got to click the ok button? thanks for help ysengrim Link to comment Share on other sites More sharing options...
Nahuel Posted November 5, 2007 Share Posted November 5, 2007 Something like this. There are others that are better... #include <GUIConstants.au3> $UserData=_InputBox("Enter Data") MsgBox(0,"","User: " & $UserData[0] & " Password: " & $UserData[1]) Func _InputBox($Title) Dim $data[2] GUICreate($Title, 256, 209, 214, 174) $Input1 = GUICtrlCreateInput("", 19, 40, 213, 21) $Input2 = GUICtrlCreateInput("", 19, 102, 213, 21,$ES_PASSWORD) GUICtrlCreateLabel("Username", 18, 18, 52, 17) GUICtrlCreateLabel("Password", 20, 80, 50, 17) $Button1 = GUICtrlCreateButton("OK", 18, 158, 101, 29, $BS_DEFPUSHBUTTON) $Button2 = GUICtrlCreateButton("Cancel", 126, 158, 101, 29, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $data[0]=GUICtrlRead($Input1) $data[1]=GUICtrlRead($Input2) ExitLoop Case $Button2 SetError(1) ExitLoop EndSwitch WEnd GUIDelete() If not @error Then Return $data EndFunc Link to comment Share on other sites More sharing options...
Ysengrim Posted November 5, 2007 Author Share Posted November 5, 2007 Thank you very much Because I'm an beginner I will have to study all the functions you used So it will be a challenge for me thanks ysengrim 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