MilesAhead Posted May 13, 2012 Posted May 13, 2012 On 5/2/2012 at 11:57 AM, 'czardas said: Actually it was a bit more than that. The line count was not being incremented and I couldn't figure out why until I noticed that the help file example was using a file handle created by FileOpen() rather than the actual file path. It seemed odd that it would almost work using the path, but because it kept reading the first line it could never exit the loop. Strange behaviour. Anyway it seems okay now. I just ran into this today usingFileReadLine(@ScriptFullPath)to read the compile directives at the top of the script to show the version number if the script was not compiled. The help implies it's not a good idea to do FileReadLine($filename, $n) where $n is incremented. It should come out and state that you need to use a handle if you don't want to specify the line number. It would save a lot of time. My Freeware Page
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