Page 1 of 1

Selecting Variables

PostPosted: Sun Dec 02, 2018 8:51 pm
by pianist
I have 70 Custom Script Buttons each executing a unique fade duration (with a unique variable) when clicked. I want to create an easy programming for each of those variables. Rather than having 70 faders (or wheels or encoders) for each Custom Script Button, I would love to have just one single wheel to first select any of the 70 variables ready for receiving the input from the second wheel which sets the fade time of the selected variable. How to accomplish this?

Jacob

Re: Selecting Variables

PostPosted: Wed Dec 05, 2018 4:06 pm
by justyn roy
I would create a ListView to hold the values that you need to feed to the Fader - they're easy to change and read in a ListView I find.
(ListView1)

Then you create a Fader to reference that ListView. (Fader1)
Change the Maximum Value of that Fader to however many values you have in the ListView (if you only have 10 values, you don't need the fader to go to 255).

Next, create the Fader that you want to control the Fade Time. (Fader2)
Change the Minimum and Maximum Value of this fader to the limits you want to impose for fade time.

Next, create a Fader to be controlled by your button. (Fader3)

Finally, Create a CustomScriptButton.

In that button, your script would look something like this:

Code: Select all
Fader3.FadeToValue(Fader2.Value.Floor,ListView1.GetCell(1,Fader1.Value))



I also added some labels that are changed by the same Button so you know where the Fader is and how long it takes to Fade there.

To add that functionality, that code would look like this: (in the same button)

Code: Select all
Label3.Text = ListView1.GetCell(1,Fader1.Value)
Label4.Text = Fader2.Value



I hope this helps, let me know if you need some more direction.

Re: Selecting Variables

PostPosted: Thu Dec 06, 2018 10:28 pm
by pianist
Thanks! This was an excellent explanation!

Jacob