Dracil Posted August 22, 2010 Posted August 22, 2010 Like the title say, i want to add text to a textfile(txt), the textfile will already contain text so its important not to overwrite it, just add. Anyone have any idea how to do this ? Thanks in advance!
somdcomputerguy Posted August 22, 2010 Posted August 22, 2010 FileWrite - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Kard0 Posted August 22, 2010 Posted August 22, 2010 I'm new to scripting with AutoIt but I looked a bit in the help file and found this. Directly from Help File, all credit to AutoIT team. $file = FileOpen("test.txt", 1) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, "Line1") FileWriteLine($file, "Line2" & @CRLF) FileWriteLine($file, "Line3") FileClose($file)
omikron48 Posted August 22, 2010 Posted August 22, 2010 Use FileOpen in append mode. Look up the help file.
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