Sign in to follow this  
Followers 0
Borje

I need help please with inputbox

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Paulie

Share this post


Link to post
Share on other sites

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 <> ""

Share this post


Link to post
Share on other sites

Thanks pauline and covaks exactly what I want, thank you so very much....

Borje

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0