Pharo Posted May 28, 2009 Posted May 28, 2009 I'm trying to write a line to a file then get that line and split it for later use. It writes and reads the information name,1,2,3,4,5,6,7,8,9,10 into $line but then when I stringsplit it doesn't work. CODE#include <file.au3> #include <Array.au3> $file = FileOpen("activity.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf _FileWriteToLine("activity.txt",1, "name,1,2,3,4,5,6,7,8,9,10",1) fileClose($file) $file = FileOpen("activity.txt", 0) While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line) Wend $avArray = StringSplit($line,",") _ArrayDisplay( $avArray, "_ArrayToString() Test" ) FileClose($file)
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