Writing A Script

   Print  Previous  Next

Introduction

In general, a script or macro consists of many instructions, which you enter in the corresponding Script/Macro editor.
The result is called source code, macro, or script.

 

The First Example

A first example of a MADRIX Script can be seen below for the MAS Script Effect.
You can simply copy and paste the source code and execute it.
The example repeatedly writes a certain text line in the Script Output of the editor.

1) Please open the Script Editor of the MAS Script Effect. Simply copy the whole example into the Editor (and replace the existing code):

@scriptname="";

@author="";

@version="";

@description="";

 

void InitEffect()

{

 

}

 

void RenderEffect()

{

    WriteText("Hello World");

}

 

void MatrixSizeChanged()

{

 InitEffect();

}

 

 

2) Compile the script (go to Script > Compile).

3) The function WriteText(string text) writes a given character string into the Script Output of the Script Editor. In this case it is "Hello World".

4) You should see this message in the Script Output.

 

MADRIX Version: 3.6j | Script Version: 2.22
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
Print   Previous   Next