2

I'm working with AutoIt, and I was wondering in there is a method I can use to append a string of text to the end of a line inside a text file. I've been browsing all over autoIt forums and there are lots of answers that are really close, but I have not found a solution that has actually worked for me. A few I didn't even really understand but tried anyway, with no luck.

The function:

FileWriteLine($LOG, "FText")  

just adds a whole new line at the bottom, while the function:

_FileWriteToLine($LOG, 1, "FText", 0)

adds the the letters FText to the beginning of the first line in the log file.

Is there any way I can add this text to the end of the first line, instead of the beginning?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
TCHP
  • 21

1 Answers1

0
$TEXT = FileRead($LOG)  
_FileWriteToLine($LOG, 1, $TEXT & "FText", 1)   

Courtesy of boththose, he answered this question here

ICE
  • 264