Jump to content

Reading from file


Guest hhravn
 Share

Recommended Posts

Guest hhravn

Im trying to read from this file, but the read functions only return the first char of the file :whistle: Anyone got any ideas?

result.txt

Edited by hhravn
Link to comment
Share on other sites

Ok, it seems that every char is followed by a char(10), and EOL is double char(10). Any way to fix this?

<{POST_SNAPBACK}>

I have no idea if this will work or if the syntax will work - I hate posting from a computer where I cannot test code before posting...

$file = FileRead($filename, FileGetSize($filename))
$lines = StringSplit($file, char(10)&char(10), 1)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Guest hhravn

I have no idea if this will work or if the syntax will work - I hate posting from a computer where I cannot test code before posting...

$file = FileRead($filename, FileGetSize($filename))
$lines = StringSplit($file, char(10)&char(10), 1)

<{POST_SNAPBACK}>

Thanks for the reply (and the effort). Sadly it doesn't really work. I still get a string i can't print to screen. What i want to do is remove any occurences of a single chr(10), and replace double chr(10) with a single.
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...