Jump to content

Accepting User Input


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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