MADRIX Forum • Passing arguments to MAS script?
Page 1 of 1

Passing arguments to MAS script?

Posted: Sat Jan 19, 2013 7:45 pm
by cadillackid
Is there a way to directly or indirectly pass arguments to an MAS script?

I want to have a script alter its operation based on different things when I run it...

so can scripting say read the value of a fixture? or can I send arguments from the remote control via DMX and read them in a script?

for example I wrote an effect that does a "spin" for a mega christmas tree.. sometimes I might want it blue.. othertimes red.. othertimes change on the fly.. obviously im filling up storage bins rather quickly to duplicate the script each time..

so if I had a way to read some outside source and operate my script accordingly.. or better yet be able to read say a DMX value from within.. so I could even change my script operation on the fly...

-Christopher

Re: Passing arguments to MAS script?

Posted: Mon Jan 21, 2013 10:36 am
by Fritzsche
Hello Christopher,

There should be a number of things available to you in the Script.

For example:

- You can read/use the color of a pixel or several pixels
- You can read/use incoming DMX values from DMX-IN remote control
- You can read/use the time of your computer
- You can read/use the sound level
- You can read/use incoming Time Code
- and probably more depending on your requirements

Of course, you are not limited to call such a function only one time per script, but several times, etc.

You might want to go through that list first: http://www.madrix.com/scripthelp/hidd_a ... tions.html

Usually 'Get...' or 'Is...' reads a value and 'Set...' executes a functions.