Nigel Posted November 9, 2009 Share Posted November 9, 2009 Hello, I am wondering how to make an autoit script that would create a .txt file. Such as having an inputbox, and whatever you enter into the inputbox is put into the .txt file. Link to comment Share on other sites More sharing options...
NELyon Posted November 9, 2009 Share Posted November 9, 2009 FileWrite("test.txt", InputBox("Enter something", "Enter something")) Link to comment Share on other sites More sharing options...
NBJ Posted November 9, 2009 Share Posted November 9, 2009 (edited) Hi Nigel. In its simplest form you would use the functions While 1 $textToWrite = InputBox ( "title", "Prompt" [, "Default" [, "password char" [, width, height [, left, top [, timeOut [, hwnd]]]]]] ) FileWriteLine ( filehandle or "filename", $textToWrite ) Wend Something like Global $file=@DesktopDir&"\File.txt" Global $TextToWrite While 1 $TextToWrite = InputBox ( "Write Stuff", "What do you want me to write?" ) FileWriteLine ($file,$TextToWrite) WEnd Cheers NBJ edit: bugger too slow! Edited November 9, 2009 by NBJ Link to comment Share on other sites More sharing options...
Nigel Posted November 9, 2009 Author Share Posted November 9, 2009 Thank you so much both of you :-) Is there anyway to make a box read a .txt file? Example: I have test.txt on my desktop. I want to have a script that will have a Msgbox read it, if that makes sense Link to comment Share on other sites More sharing options...
NBJ Posted November 9, 2009 Share Posted November 9, 2009 Try the FileRead function. Link to comment Share on other sites More sharing options...
Nigel Posted November 9, 2009 Author Share Posted November 9, 2009 Alright, thanks for the help NBJ :-)! 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