Jump to content

Question about ReadFile


Recommended Posts

  • Developers

Have you opened the helpfile and looked at the Filexxx Functions before posting here ? muttley

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

1.How can I get number of file lines (.txt)

_FileReadToArray($sFilePath,$aArray)
$iNumLines = $aArray[0]

2.How can I read 1st line then 2nd line, etc....

For $i = 1 To $aArray[0]
$sLine = FileReadLine($sFilePath,$i)
Next
Link to comment
Share on other sites

  • Developers

2.How can I read 1st line then 2nd line, etc....

For $i = 1 To $aArray[0]
$sLine = FileReadLine($sFilePath,$i)
Next
Just a FYI:Doing a FileOpen() and then the for-next loop using fileread(FileHandle) will perform better.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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