#include <File.au3>
#include <FileConstants.au3>
Local $sTestfile = "_FileWriteToLine.txt"
Local $hTestfile = FileOpen($sTestfile, $FO_APPEND)
FileWriteLine($hTestfile, "Line 1")
FileWriteLine($hTestfile, "Line 2")
FileWriteLine($hTestfile, "Line 3")
FileClose($hTestfile)
_FileWriteToLine("_FileWriteToLine.txt", 2, "Overwritten", True)
The above example code first creates a text file that has four lines after FileClose:
Line 1
Line 2
Line 3
And an empty line.
After _FileWriteToLine only three lines are left:
Line 1
Overwritten
Line 3
The empty line has been removed by the function _FileWriteToLine!