Jump to content
Sign in to follow this  
mattschinkel

_FileDeleteLine

Recommended Posts

mattschinkel

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.

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.