Jump to content

I need help please with inputbox


Borje
 Share

Recommended Posts

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

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
Link to comment
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 <> ""
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...