Quick Sign In:  

Forum: Old versions

Topic: expressions question

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

Hi,

How are variables incremented in VDJ script?

This is what I have tried:

set "$variable1" +1.

It would be the VDJ script equivalent of let "$variable1" = "$variable1" +1

Thanks for any help.






 

geposted Sun 05 Jun 11 @ 8:14 am
If you want to have a button to scroll through variables you would need to use

cycle "my_var" #

e.g.

cycle "califauna" 4
cycle "califauna" -4

what this will do is have 4 variables that will cycle through either forwards or (-) backwards. The four variables you will get for scripting are:

cycle "califauna" 1 ?
cycle "califauna" 2 ?
cycle "califauna" 3 ?
cycle "califauna" 0 ?

You can use any number and any variable "name" you like
 

geposted Sun 05 Jun 11 @ 8:43 am
Thanks but I dont going to let me do what I want.

I want to move the crossfader to a point given by a variable. VDJ will be controlled by Bomes Midi Translator, which will send midi messages to increment the value of the variable , either up or down. So I need a way to increment the value of the variable when one button is pressed, and increment down when another button is pressed. So it goes up and down according to which button is pressed.

As I say, in other scripting programs I have used it is just

"califauna" = califauna" +1

or

"califauna" = "califauna" -1

Can I acheive that with the above command somehow? If I use 'cycle "califauna" 50' for button A, and 'cycle "califauna" -50 for button B, what would happen if button A was pushed 5 times, then Button B was pushed? Would califauna go to five, then down to four? Or would it go to five then be reset to 0 when B is pushed?



 

geposted Sun 05 Jun 11 @ 7:54 pm
This is a line out of my touch screen skin:

<button action="cycle 'mode' 4 & var_equal 'mode' 1 ? browser_gotofolder 'Z:\VARIOUS' : var_equal 'mode' 2 ? browser_gotofolder 'Z:\RETRO' : var_equal 'mode' 3 ? browser_gotofolder 'Z:\TROPICAL' : browser_gotofolder 'Z:\REGGAE'">

Is this what you were looking for?

The button cycles, so after 4 (in my case) it returns to 1.

Hope this helps.
 

geposted Sun 12 Jun 11 @ 8:36 am
Corny: Yes, Im using the cycle command now to increment the variable. I discovered it retains the value of the variable even when changing the amount to cycle the variable by, and that was key for my purposes. With it I can acheive the same result as incrementing and decrementing with an 'expression' like in most other scripting languages, so its all good.

Cheers.
 

geposted Mon 13 Jun 11 @ 11:40 am


(Alte Themen und Foren werden automatisch geschlossen)