Passing arguments to MAS script?
Moderator: MADRIX Team
-
- Posts: 18
- Joined: Tue Nov 13, 2012 12:11 am
Passing arguments to MAS script?
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
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?
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.
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.