Additional Commands

Edward Updated by Edward

In addition to normal command line entries, a macro may contain comments, labels and the commands listed below.

 

C++ Style Comments

To add a line of text that will not be executed, place two slashes (//) before the text. As the system executes each line, it will ignore lines that begin with these symbols.

 

Inject

The inject command may be used to display a command that needs more user input to be completed. The underline character may be used to insert a space where needed.

 

Example:

Inject 1/6 @_

This command would place “1/6 @  “ on the command line. The user could then supply a value to complete the command. The macro would then continue with the next line.

 

Sleep

The sleep command will cause the software to pause before continuing to execute commands after this line. In the above example, Line 4 contains a 1 second sleep command.

 

Loop & Loop End

You can loop a series of commands using the “Loop” and “Loop End” keywords.

 

Loop {number of times} – This command will mark the beginning of the loop and also define how many times NEO will perform the loop block.  In the example, Line 2 starts a loop with the number of iterations set by the value in the variable “Maxcount”. Lines 3-5 will be executed maxcount times after which the macro will continue at Line 7.

 

Loop End – This command will mark the end of the loop. All the commands between these two commands will executed however many times was specified in the “Loop” command.

 

Branch, Label & End

The “Branch” command can be used to create conditional jumps in the macro. If the condition is true, the macro will jump to a predefined label. If the condition is false, the macro commands after the “Branch” will execute until the “End” command.

 

Branch {condition} {label}

 

Condition takes the form: {variable} {operator} {value}.  In addition to variables you have defined, the following special variables can be used:

 

channel({number}) – Returns the current output level (%) of the specified channel number.

 

group({number}) – Returns the current value (%) of the specified group number.

 

submaster({number}) – Returns the current level (%) of the specified submaster number.

 

playback({number}) – Returns the current cue number running in the specified playback.

The operators are: Equal (=), Greater than (>), Less than (<), Greater or equal (>=), & Less or equal (<=).

Labels are any text that starts with the hash (#) character.

 

Examples:

 branch channel(3) > 30 label1 3@10 end #label1 3@50.

The above macro will set channel 3 to 50% if its current value is greater than 30; otherwise it will be set to 10%.

 

 branch my_variable <= 5 label1 Jump to label1 if the current value of my_variable is less than or equal to 5.

 

branch playback(0) > 10.5 label1 Jump to label1 if the current active cue number in playback 0 is greater than 10.5.

How did we do?

Conditional Events

Passing Parameters

Contact