Lets say i have a .ahk file and i want to delete a line Until the end of the line, its hard to say but i show you how i mean ._.
Here is a def that i found, but its just add a new line. Maybe its help you.
Code: Select all
; test 123
; another just for fun
; And the def
InsertLine(Line, File, Pos) {
FileRead, Content, %File%
Loop, Parse, Content, `n, `r
If (A_Index < Pos)
Front .= A_LoopField "`n"
Else
Back .= A_LoopField "`n"
FileDelete, %File%
FileAppend, % Front Line "`n" Back, %File%
}
Thankss