====== XML format ====== There are dozens of books on XML only - it is a widely used language for many purposes. As always, [[https://en.wikipedia.org/wiki/XML|wikipedia]] is a good read. however, based on an example, the (for this purpose) essential items will be explained. An example macro file might look like this: Sets PlaybackPaging to NeverHold. ActionScript.SetProperty.Enum("Handles.HandlesHeldover", "NeverHold") === The 1st line === is the opening XML declaration. It is not required but good practice. === The 2nd line === has some required and some non-required parts: * < the angled brackets > are essential for every xml tag * ''avolites.macros'' is the essential macro tag which makes Titan interpret this file correctly * the ''xmlns...'' part is the namespace of the file. It is not required and can be omitted. * this line corresponds with the last line . Note the slash at the beginning which makes this a closing tag - **every tag needs to be closed!** === The 3rd line === is a comment, and will not be interpreted by Titan. It is good practice to comment at least what the macro does and who wrote it - and in more advanced macros, comments on the real logic will be of great help. === The 4th line === corresponds with line 9 . These two lines hold the macro itself - each file can hold multiple macros where each macro starts with '''' and ends with the corresponding ''''. The parts ''id=... '' and ''name=... '' are properties of this macro: * id is required and a unique identifier * name is semi-required and is the name which is shown in Titan - if you omit it, then you'll only see something like 'Macro1'. === Lines 5 through 8 === Sets PlaybackPaging to NeverHold. ActionScript.SetProperty.Enum("Handles.HandlesHeldover", "NeverHold") are the contents of our macro: * '''' corresponds with the closing '''', is optional, and may hold a longer description of the macro * '''' corresponds with the closing '''' and holds the actions which the macro is to perform (one or more steps) * it is also possible to use '''' ... '''' and '''' ... '''' in order to have separate actions when the button is pressed and when it is released, see [[macros:example:stopwatchflash|]] * ''''...'''' is the function which this step is to perform. In this case it calls the function ''ActionScript.SetProperty.Enum()'' with the arguments ''"Handles.HandlesHeldover"'' and ''"NeverHold"''. A brief introduction about possible functions [[http://www.avosupport.de/downloads/manuals/Avolites%20Titan%20Macros%20v0.9.pdf|is available here]]. But essentially, this whole wiki is dedicated to possible macros :-/ It is possible to bundle some steps together into one block with {curly braces} like this: Playbacks.SetRecordType("RecordCueModeProgrammer") { Playbacks.StoreCue("PlaybackWindow", 1000, false); Handles.SetSourceHandle("PlaybackWindow", 1000); ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:10000); Handles.SetUserNumber(); Handles.ClearSelection(); } See http://forum.avolites.com/viewtopic.php?f=20&t=5783. ~~NOCACHE~~ {{page>macros:formats_and_syntax#further_readings}} ~~DISCUSSION~~