Table of Contents

The Syntax of Functions

Functions are the heart of macros, functions are listed here and - much more so - in the API documentation. But how should we read something like this:

Void Group.StoreMenu.StoreOnButton(String group, Int32 index, AcwUserNumber userNumber)

Essentially functions are the part of the code where the system is instructed to do something.

Putting this to use we can now at least make something out of the above mentioned function:

If you want to cross-check: http://api.avolites.com/10.1/Group.StoreMenu.StoreOnButton.html

StoreOnButton

The user has pressed a preset flash whilst in the store menu. Try and record the group to that handle

Namespace: Group.StoreMenu
Parameters: group ( String ) : Button group
index ( Int32 ) : Index into that group
userNumber ( AcwUserNumber ) : The user number of the group to store

We have come quite close, won't you think?

some more examples

functions with return value

Single Math.Cast.ToSingle(Object value)

see http://api.avolites.com/10.1/Math.Cast.ToSingle.html

All the Math.Cast functions do explicitely change a value's type , and hence, by definition, DO have a return value. This function takes an Object as input (parameter), and spits out a single precision value

functions as parameter - nested functions

The example changexfade takes this a step further:

ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", Math.Cast.ToSingle(1))

don't be confused by commas - INSIDE a string

Void CueLists.GoBack(Handle handle)
CueLists.GoBack("Location=Playbacks,2,1")

See Cuelist - Go back

At first glance this looks like more parameters in the brackets - but it isn't. The commas are inside the double quotes which make the entire part one string: “Location=Playbacks,2,1”. And the function definition shows that this is a Handle.


further readings

2017/10/13 15:12 · icke_siegen