Sign in to follow this  
Followers 0
brodie28

FileWriteLine

4 posts in this topic

#1 ·  Posted (edited)

I am having trouble with this code...

$locals = FileOpen ( "locals.txt", 1)

For $number = 1 to 79

$line = FileReadLine ($locals, $number)

MsgBox(0, "title", $line)

next

It works perfectly when I open the file in read mode, but when I open it in append mode the message box always shows up blank... I don't know why it would be doing that.

Edited by brodie28

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Get beta and use _FileWriteLine or something. Otherwise, read the whole file, split it (StringSplit($File,@CRLF)) and If stringinstr($split[$x] Then $return &= $split[$x]

Not a full description, but you should know what to do.

Edit: It looks fine to me, call a @error check to see if the file has been opened.

Edited by Manadar

Share this post


Link to post
Share on other sites

Apparently a file cannot be in read and write mode at the same time...

Which sucks because I will now have to have alot of file opening and closing going on during my script.

Share this post


Link to post
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
Sign in to follow this  
Followers 0