Here is an example Macro:
Macro: Do Stack
Balance Colour and Brightness
Align all Frames Automatically (Two pass)
Find Detail(75)
Remove Islands(5)
Fill Gaps
Remove Colour Steps
Interpolated Output
If you wished you could split this into smaller components:
Macro: Do Stack
Preprocessing(1,0,1)
Stacking(1,0,1)
Postprocessing(1,0,1)
Macro: Preprocessing
Balance Colour and Brightness
Align all Frames Automatically (Two pass)
Macro: Stacking
Find Detail(75)
Remove Islands(5)
Fill Gaps
Macro: Postprocessing
Remove Colour Steps
Interpolated Output
The lines of the Do Stack Macro can be composed of Commands or the names of other Macros. In fact, Macros behave just like Commands and are included in the dropdown list on the Macro Editor. In this case the (1,0,1)'s after each Macro name are not used.
Now suppose you wanted to do a test run varying Find Detail.
Macro: Do Stack
Preprocessing(1,0,1)
Stacking(10,10,100)
Macro: Preprocessing
Balance Colour and Brightness
Align all Frames Automatically (Two pass)
Macro: Stacking
Find Detail(75)
NS
Remove Islands(5)
Fill Gaps
Postprocessing(1,0,1)
Macro: Postprocessing
Remove Colour Steps
Interpolated Output
Make New Frame from Out
Notice the changes from the previous example.
In the Do Stack Macro Stacking(10,10,100) means do the Stacking Macro passing a value of 10, then increase the value by 10 and do it again. Continue like this until the value that would be passed is greater than 100. So the general form of a Macro call like this is Macro(Start value, Increment, Final value). The macro is called with every value between the Start and Finish values that can be reached by adding the Increment.
Postprocessing(1,0,1) has been moved to the Stacking Macro. This is because it needs to be run after every trial run.
Now for the Stacking Macro. Apart from adding Postprocessing(1,0,1) at the end several changes have been made to Find Detail(75). Notice the letters N and S to the right. These will appear when you are editing a Macro in the Macro Editor, when you tick Add to Name or tick one of the boxes above a parameter.
S means Substitute the value passed to this macro for the parameter shown in brackets, the one with the tick mark over it on the Macro Editor. There are a few points to note here. If this macro was invoked by selecting its menu item, the value in brackets is used, i.e. because no value was passed no value can be substituted. A Macro receives only one value. This can be used as many times as desired but will not change during a single call.
N means add information to the name used when creating a new Frame via the line Make New Frame from Out. Thus you can instantly see from the Frame name how it was generated.
Make New Frame from Out creates a new frame and places it at the top of the stack. You will notice that on the title line it has an '*' in front of it. This indicates that it is Unused, i.e. it will be ignored by functions like Find Detail so you are safe to do another run on the original frames while this frame is in memory. Remember that Interpolated Output puts its result in a location called 'out'. On a subsequent run this would be overwritten, hence the need to create a New Frames.
When designing a Macro you have the option of ticking Pause. This is indicated by the letter P and causes a macro to wait for your input when it reaches any P step. You can Pause at any step, alter parameters for that step, ignore that step, exit that Macro, or do nothing and Continue. Using Pause is the only way to alter more than one parameter within a single nested Macro.
Note the maximum nesting depth is set to five, I have limited this in order to catch mistakes like calling a Macro from within itself or from within a nested macro, thus entering an infinite loop.
For your convenience here is the above example to download CZ5/Macro_Example_1.czm.
Just download it and put it in the same folder as CombineZ5.exe, then click on Load Macro Set on the Macro Menu, load it, and you should see the menu change. Start it by clicking on Do Stack and you should finish with 10 new frames.