XML format

There are dozens of books on XML only - it is a widely used language for many purposes. As always, 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:

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
  <!-- Macro to set PlaybackPaging to never. Sebastian Beutel with help by Gregory Haynes 05/09/2016 -->
  <macro id="Avolites.Macros.PagingNeverHold" name="Set PbPaging to NeverHold">
    <description>Sets PlaybackPaging to NeverHold.</description>
    <sequence>
      <step>ActionScript.SetProperty.Enum("Handles.HandlesHeldover", "NeverHold")</step>
    </sequence>
  </macro>
</avolites.macros>

The 1st line

<?xml version="1.0" encoding="utf-8"?>

is the opening XML declaration. It is not required but good practice.

The 2nd line

<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">

has some required and some non-required parts:

The 3rd line

<!-- Macro to set PlaybackPaging to never. ... -->

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

<macro id="Avolites.Macros.PagingNeverHold" name="Set PbPaging to NeverHold">

corresponds with line 9

</macro>

. These two lines hold the macro itself - each file can hold multiple macros where each macro starts with <macro …> and ends with the corresponding </macro>.

The parts id=… and name=… are properties of this macro:

Lines 5 through 8

    <description>Sets PlaybackPaging to NeverHold.</description>
    <sequence>
      <step>ActionScript.SetProperty.Enum("Handles.HandlesHeldover", "NeverHold")</step>
    </sequence>

are the contents of our macro:

A brief introduction about possible functions 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:

<sequence>
  <step>Playbacks.SetRecordType("RecordCueModeProgrammer")</step>
  <step>
         {
            Playbacks.StoreCue("PlaybackWindow", 1000, false);
            Handles.SetSourceHandle("PlaybackWindow", 1000);
            ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:10000);
            Handles.SetUserNumber();
            Handles.ClearSelection();
         }
     </step>
</sequence>

See http://forum.avolites.com/viewtopic.php?f=20&t=5783.

further readings
2017/10/13 15:12 · icke_siegen