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.
delete()
deletes somethingplaybacks.delete()
- which probably deletes a playback - and fixtures.delete()
- which probably deletes a fixture.go()
is a function whereas go
is something else, but not a function.fixtures.delete(29)
in order to have fixture no. 29 deleted. In this case, 29 is the parameter value.fixture.delete(Int32 fixtureId)
as our fixture.delete function needs the id of the fixture-to-delete which must be an integer value.function(type1 parameter1, type2 parameter2, type3 parameter3)
Putting this to use we can now at least make something out of the above mentioned function:
Void
– this function does something but doesn't return any valueGroup.StoreMenu
– this is the namespace. Most likely this function is applicable in the Group Store menu (in console notation: <Group> [Store] )StoreOnButton
– this is the very function. Probably it stores something (a group, see the namespace) on a button.String group, Int32 index, AcwUserNumber userNumber
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?
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
The example changexfade takes this a step further:
ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", Math.Cast.ToSingle(1))
ActionScript.SetProperty
sets a property, in this case the property “Playbacks.Editor.Times.ChaseFixtureOverlap”
, to a valueMath.Cast.ToSingle
…Void CueLists.GoBack(Handle handle) CueLists.GoBack("Location=Playbacks,2,1")
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.