Sign in to follow this  
Followers 0
Snarg

StringSplit

4 posts in this topic

$foo = 'one,two'
StringSplit ($foo, ',')
MsgBox (0, '$foo', '$foo[0]= ' & $foo[0] & '$foo[1] = ' & $foo[1] & '$foo[2] = ' & $foo[2])

The expected output would be: $foo[0] = 1, $foo[1] = 'one', $foo[2] = 'two'. However, it returns nothing. I have gone over the help files more then a couple times and have tried every variation I can think of. I am using an older beta, so that may be the issue. I would test this, I can not load AutoIt onto this computer. Thank you in advace for any help.


A little reading goes a long way. Post count means nothing.

Share this post


Link to post
Share on other sites



$text = 'one,two'

$foo = StringSplit($text, ',')

MsgBox(0, '', $foo[1] & ' ' & $foo[2])

I am an idiot. Thank you xcal.

A little reading goes a long way. Post count means nothing.

Share this post


Link to post
Share on other sites

Heh you're not an idiot... that's kind of harsh. You should see some of the stuff I do late at night. The next morning I'll wake up and check it out and it's like 'wtf was I thinking.'

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