Variable support in the script engine is still very limited. At present all you can do is set a variables value using a statement likespdrmn55 wrote:Can you give me some information on how to use variables? Can I use a variable to set the delay or metronome? How do I change a variable? Like if I wanted to add 20 to my variable. Thanks I'm really enjoying the simplicity of writing a tease using this!
myVariable = somevalue
or delete the variable using a statement like
myVariable = ""
The main use is to communicate settings between scripts and regular GuideMe pages.
You can't do any math operations yet like adding 20, you can only define a new value by assigning it as above (myVariable = newvalue)
Variables can not be used for setting delays or metronomes, You can use the <RandomFrom ...> or <ChooseFrom...> tags, but that's all.
I do plan on adding basic expressions so you can do stuff like
myVariable = myVariable + 20
but I haven't had the time and energy to work on that lately. I've been busy with other stuff.
Glad you like it so far. I'd love to see some samples of scripts posted by others, so let's see them!