Sign in to follow this  
Followers 0
ODell

Concatenation error

3 posts in this topic

I am trying to concatenate string in a Do Until loop. I have read the help file for Concatenation and tried everything I can thing. Searched through the form and found several answers that should have workde but sill get errors. The code is:

$tempArray = StringSplit($installPath, "\")

$strPARENT = ""

For $intCounter = 0 To UBound($tempArray) - 1 Step 1

$strPARENT &= $tempArray($intCounter) & "\"

Next

And the error is:

C:\Program Files\AutoIt3\test.au3 (89) : ==> Error in expression.:

$strPARENT &= $tempArray($intCounter) & "\"

$strPARENT &= ^ ERROR

Have tried several varations of the "&" and the "&=" but no luck.

Thanks for any pointers.

Share this post


Link to post
Share on other sites



You've got parens around your subscript, instead of brackets.

And this line will work better for you:

For $intCounter = 1 To  $tempArray[0]

Share this post


Link to post
Share on other sites

You've got parens around your subscript, instead of brackets.

And this line will work better for you:

For $intCounter = 1 To  $tempArray[0]

Thanks another set of eyes is always helpfull.

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