OK, I thought that might help.
I'm trying to automate re-arrangement of channels in n-track studio, which is a daw. So, this works because $directionID contains a numeric variable that refers to the control:
ControlClick ("Track properties", "", $directionID )
The problem is here, because there are a whole group of controls (FlapsCheckbox) with the same ID number. This works:
ControlClick ( "Mixer", "", "[CLASSNN:FlapsCheckbox57]")
where 57 is the instance, but this does not work:
Global $controlInstance = ($trackNum+2) * 3
Global $controlInstanceString = String($controlInstance)
Global $classNNString = '"[CLASSNN:FlapsCheckbox' & $controlInstanceString & ']"'
ControlClick ( "Mixer", "", $classNNString )
Return from this is exactly what it should be:
MsgBox(0, "$classNNString", $classNNString)