Selecting Variables

Moderator: Moderator Group

Selecting Variables

Postby pianist » Sun Dec 02, 2018 8:51 pm

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
pianist
 
Posts: 29
Joined: Mon Mar 30, 2015 1:02 pm

Re: Selecting Variables

Postby justyn roy » Wed Dec 05, 2018 4:06 pm

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.
You do not have the required permissions to view the files attached to this post.
Justyn Roy

Online Manual
User avatar
justyn roy
 
Posts: 132
Joined: Tue Sep 27, 2016 1:26 am

Re: Selecting Variables

Postby pianist » Thu Dec 06, 2018 10:28 pm

Thanks! This was an excellent explanation!

Jacob
pianist
 
Posts: 29
Joined: Mon Mar 30, 2015 1:02 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 26 guests

cron