Page 1 of 1

how to pass variables in custom script? customScript(var)

Posted: 07 Oct 2013 09:30
by pestopan
Hi,
how can I pass variables to a custom scripts, like the internal functions?

Code: Select all

-- Start: faderScript()--

// On expression: x = any
decl variableToPass = x;

// Call script in a different place of the tree, here: 'Project/Interface/Scripts'
Scripts.myCustomScript(variableToPass);

-- End: faderScript()--
Cheers,
Peter

Re: how to pass variables in custom script? customScript(var

Posted: 07 Oct 2013 12:19
by Macciza
Hi
Looks like it should work assuming that Scripts is a Container
And that faderScript is in a Fader so it can get its x value . . .
Check for typos in your actual script perhaps
MM

Re: how to pass variables in custom script? customScript(var

Posted: 17 Oct 2013 17:15
by pestopan
Thanks Macciza!!!
It works as expected.
typo.