Okay in response to myself, I think I answered my own question. Seems when trying to explain what you're doing helps yourself figure out the solution
Basically I just had to get creative with it. I knew I had to do it in 2 steps, but my brain wasn't quite grasping the method at first.
Setup separate objects with the string broken up.
code1's object:
sTestObj=('Parent.
code2's object:
.text')
Then do this:
sString=('Long Item Name')
Parent.DoCommand.onpress=(code1 ## sString ## code2)
Parent.DoCommand.press=true
However the problem I don't think I can solve.... Items with apostrophes in their names
