ODell Posted February 16, 2009 Posted February 16, 2009 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) & "\" NextAnd the error is:C:\Program Files\AutoIt3\test.au3 (89) : ==> Error in expression.:$strPARENT &= $tempArray($intCounter) & "\"$strPARENT &= ^ ERRORHave tried several varations of the "&" and the "&=" but no luck.Thanks for any pointers.
Spiff59 Posted February 16, 2009 Posted February 16, 2009 You've got parens around your subscript, instead of brackets. And this line will work better for you: For $intCounter = 1 To $tempArray[0]
ODell Posted February 16, 2009 Author Posted February 16, 2009 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.
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