Sign in to follow this  
Followers 0
AzKay

Remove Blank Lines.

4 posts in this topic

Any ideas? I know how to remove white spaces, etc.

But how would you remove just the empty lines?

eg:

aaaaa

aaaaa

aaaaa

The lines "between" that are empty. So it would end up being:

aaaaa

aaaaa

aaaaa


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

maybe...

#include <file.au3>

Dim $aRecords, $file = "C:\test.txt"

If Not _FileReadToArray($file,$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf

For $x = 1 to $aRecords[0]
    If $aRecords[$x] = "" Then ContinueLoop
    Msgbox(0,'Record:' & $x, $aRecords[$x])
Next

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I dont want it in one big string.

@Valuater ||

Thanks.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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  
Followers 0