Example
by: | Gregory Haynes, Jan 2016 |
---|---|
published: | http://forum.avolites.com/viewtopic.php?f=20&t=4361#p15847 |
description: | exports macro no.1 as file in the usermacro location |
<?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 export another macro. Gregory Haynes 13/02/2016 --> <macro id="Avolites.Macros.ExportMacro" name="Export Macro Number 1"> <description>Exports the macro with user number 1.</description> <sequence> <step>UserMacros.SetCurrentMacroFromUserNumber(1)</step> <step>UserMacros.Export(UserMacros.CurrentMacroId)</step> </sequence> </macro> </avolites.macros>
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
<step>UserMacros.SetCurrentMacroFromUserNumber(1)</step>
makes the macro with the usernumer 1 current, i.e. selects it. Change the number if you want to export another macro.<step>UserMacros.Export(UserMacros.CurrentMacroId)</step>
actually exports the previously selected macro - all the file handling is done in this functionSee also http://forum.avolites.com/viewtopic.php?f=20&t=5733 for hints on exporting more macros.
<Macro>
[View All]
and execute (click) it