Jump to content

_FileDeleteLine


 Share

Recommended Posts

Here is a _FileDeleteLine function that I created. I know using arrays are slow, so maybe it could be improved. I think autoit needs a function like this one.

You could use _FileWriteToLine with "" as a parameter, but it will not remove the line space like my function will.

Func _FileDeleteLine(ByRef $iFileName, ByRef $iLine)
    Dim $iMyArray
    _FileReadToArray($iFileName, $iMyArray)
    _ArrayDelete ($iMyArray, 0)
    _ArrayDelete ($iMyArray, $iLine)
    _FileWriteFromArray($iFileName, $iMyArray)
EndFunc

Matt.

Link to comment
Share on other sites

You could use _FileWriteToLine with "" as a parameter, but it will not remove the line space like my function will.

Just for info, _FileWriteToLine() will delete the line when the $fOverWrite flag is set to 1.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...