tarre Posted September 24, 2008 Posted September 24, 2008 heya. im searching for an function that reads my file from the end to the start. ive searched \ googled but didnt get anything this would be very useful. thx
NeoFoX Posted September 24, 2008 Posted September 24, 2008 Perhaps have a look at the nice function called: FileReadLine(); Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]
tarre Posted September 24, 2008 Author Posted September 24, 2008 Perhaps have a look at the nice function called:FileReadLine(); Neobut that reads from the top to the bottom. i want to read from the bottom to the top :/. i dont have any ideas how to acomplish that.
NeoFoX Posted September 24, 2008 Posted September 24, 2008 Here a little example which reads from the bottom till the top: #include <file.au3> $CountLines = _FileCountLines("test.txt") $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read lines of text until the top of the file is reached For $i=$Countlines to 1 Step -1 $line = FileReadLine($file,$i) MsgBox(0, "Line read:", $line) Next FileClose($file) Greetz, Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now