Borje Posted December 30, 2007 Share Posted December 30, 2007 Hello I have problem with inputbox I dont know what I must do to have this inputbox to ask for 2 things first it should ask for Name and next it should ask for email addres. Is it possible to do this without to open 2 Inputboxes window? Perhaps some loop here? Function: when I write the name and pusch OK I would like to write the mailaddres and pusch OK again and then have example 2 InputBoxAnswers perhaps InputBoxanswer1 for the name and InputBoxanswer2 for the mailaddres is that possible? If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer $sInputBoxAnswer = InputBox("Input","Please enter your name here",""," ","-1","-1","-1","-1") Select Case @Error = 0 ;OK - The string returned is valid Case @Error = 1 ;The Cancel button was pushed Case @Error = 3 ;The InputBox failed to open EndSelect Link to comment Share on other sites More sharing options...
Paulie Posted December 30, 2007 Share Posted December 30, 2007 (edited) You could do this: Do $Input1 = InputBox("Hello!","Input Name") If @error = 1 then Exit $Input2 = InputBox("Hello!","Input Email") If @error = 1 then Exit Until $Input1 <> "" AND $Input2 <> "" MsgBox(0, "Result", "Your name is: "&$Input1&@CRLF&"Your e-mail is: "&$Input2) But to do that with only one input would require you to make your own Inputbox with a GUI Edited December 30, 2007 by Paulie Link to comment Share on other sites More sharing options...
covaks Posted December 30, 2007 Share Posted December 30, 2007 If you want a single inputbox with 2 edit controls, one for name and one for address, you'd have to make it yourself. Or you can just have it pop up two inputboxes: Do $strName = InputBox("Input","Please enter your name here",""," M") Until $strName <> "" Do $strAddress = InputBox("Input","Please enter your address here",""," M") Until $strAddress <> "" Link to comment Share on other sites More sharing options...
Borje Posted January 1, 2008 Author Share Posted January 1, 2008 Thanks pauline and covaks exactly what I want, thank you so very much.... Borje 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