RedneckTech Posted July 9, 2012 Share Posted July 9, 2012 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 More sharing options...
JohnQSmith Posted July 9, 2012 Share Posted July 9, 2012 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". Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 9, 2012 Moderators Share Posted July 9, 2012 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 More sharing options...
RedneckTech Posted July 9, 2012 Author Share Posted July 9, 2012 oooooo. So if I declare nothing for the "password" then whatever the user inputs will be saved as that variable? Link to comment Share on other sites More sharing options...
RedneckTech Posted July 9, 2012 Author Share Posted July 9, 2012 OK. Just looked at it. Realized I was reading it wrong and making things way more complex than needed. Thank you both. 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