Jump to content

FileReadLine Limit 65534 characters?


mocro
 Share

Recommended Posts

Hello,

I was looking to write a program to extract text from an html file. There are some unusually long lines in most html files that are downloaded using "InetGet" however when I use the "FileReadLine" function, it only seems to grab a maximum of 65534 characters.

Is this a limitation of this function?

Any help would be appreciated,

Thanks,

Mocro

Link to comment
Share on other sites

Just a side note, you can't split a string by more than one character (@CRLF is 2), I usually use something like this:

; use  $x=File2Array("c:\mytempfile.html")
; returns $x as an array.
; by ScriptKitty
func file2array($filename)
$_file=FileRead($filename,FileGetSize($filename))
$_file=StringReplace($_file,@lf,@cr); make all @lf into @cr
$_file=StringReplace($_file,@cr&@cr,@cr); remove extras you made from @CRLFs
$_file=StringSplit($file,@cr); splits by @cr character
return $_file
endfunc

I usually do it in two lines, but this explains it a bit more. Web documents are written in many forms, and some use @cr, some @lf, and some @crlf. This splits them all pretty well.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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...