Guest hhravn Posted August 5, 2005 Share Posted August 5, 2005 (edited) Im trying to read from this file, but the read functions only return the first char of the file Anyone got any ideas?result.txt Edited August 5, 2005 by hhravn Link to comment Share on other sites More sharing options...
Guest hhravn Posted August 5, 2005 Share Posted August 5, 2005 Ok, it seems that every char is followed by a char(10), and EOL is double char(10). Any way to fix this? Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 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 More sharing options...
Guest hhravn Posted August 6, 2005 Share Posted August 6, 2005 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 More sharing options...
herewasplato Posted August 6, 2005 Share Posted August 6, 2005 Now that I can test it, I see the problems, I just don't have the solutions.I also see that I typed char(10) instead of chr(10)...Perhaps the info in this post might help:http://www.autoitscript.com/forum/index.ph...04&st=0&p=88958 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
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