Sign in to follow this  
Followers 0
RedneckTech

Accepting User Input

5 posts in this topic

So Ive been playing with something so no rush, but I'm trying to open a gui looking for user input, accept that user input, and write it to a file. Ive been working with InputBox and FileOpenDialog trying to see if i can force them to do what im looking for and frankly im lost.

The gyst is that im looking for a file, If that file is not there open it, then prompt the user for the information to put into that file (the name of which has already been predetermined in the script)

If FileExists($File) = 0 Then

FileOpen($File, 1)

$Userinput = ???

FileWriteLine($File, $UserInput)

EndIf

Seems simple enough, but i'm trying to figure out how to accept the user input.

Again, no rush. I know this could simply be done with a .inf file as I have already done several times, but I'm trying to do this for my own knowledge

Share this post


Link to post
Share on other sites



Take a look at InputBox in the help.


Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

So Ive been playing with something so no rush, but I'm trying to open a gui looking for user input, accept that user input, and write it to a file. Ive been working with InputBox and FileOpenDialog trying to see if i can force them to do what im looking for and frankly im lost.

As JohnQSmith suggests, you mention you've been looking at InputBox but have missed that the example in the help file does exactly what you're trying to accomplish. All you need to do is declare the InputBox as a variable, and then write that variable to your file.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

oooooo. So if I declare nothing for the "password" then whatever the user inputs will be saved as that variable?

Share this post


Link to post
Share on other sites

OK. Just looked at it. Realized I was reading it wrong and making things way more complex than needed. Thank you both.

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