Jump to content
Sign in to follow this  

StingSplit not working like I want

Recommended Posts


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.

#include <file.au3>

#include <Array.au3>

$file = FileOpen("activity.txt", 1)

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")



_FileWriteToLine("activity.txt",1, "name,1,2,3,4,5,6,7,8,9,10",1)


$file = FileOpen("activity.txt", 0)

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

MsgBox(0, "Line read:", $line)


$avArray = StringSplit($line,",")

_ArrayDisplay( $avArray, "_ArrayToString() Test" )


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.