ODell Posted February 16, 2009 Share 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. Link to comment Share on other sites More sharing options...
Spiff59 Posted February 16, 2009 Share 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] Link to comment Share on other sites More sharing options...
ODell Posted February 16, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
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