Jump to content

Bl1

Members
  • Posts

    6
  • Joined

  • Last visited

Bl1's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks for the help. I did in fact get to work with a variation on this: $iInst = 1        ; there is no harm though to specify CLASSNN $sCtrlID = "[CLASSNN:Edit" & $iInst & "]" ControlSend($hWnd, "", $sCtrlID, "Test 3" & @LF) And in fact I did originally have extraneous quote marks. It was a mental error, because I didn't realize that when the variable was interpreted, it would not need for a string to be in quotations. Other than that everything was working. It recognizes the correct window by name. I could not use just a simple instance number alone as the variable, because there are controls in the same window of different classes with the same instance number. So this will make the script more compact and should be more efficient.
  2. Thanks for those suggestions. I'll try to see if any of that works for me.
  3. By the way, you are correct that this is wrong: Global $classNNString = "[CLASSNN:FlapsCheckbox" & $controlInstanceString & "]" but that's not actual the result.
  4. I don't know, when it's provided as a literal string it has to be in quotes. I might have tried it without quotes, I don't recall. I can try that when I'm on the other machine. But really there should be a definitive answer to this in the documentation. Either the controlID parameter supports string variables, or it doesn't.
  5. 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)
  6. Hi. New to the forum here. It seems string variables are not accepted in the controlID parameter in control functions, such as ControlClick. It works with a numeric variable, or literal text, but I want to use CLASSNN with a variable containing the instance. Has anybody done a workaround for this? As it is I'm using a conditional if-then statement including a ControlClick for each possible instance. It works, but it's not elegant, and it places a limit on the number of useful instances. I appreciate any suggestions, or if there is something in the scripting language that I'm unaware of, please enlighten me. I can provide my code if necessary.
×
×
  • Create New...