User Tools

Site Tools


macros:example:firereleasehighlightclear

Example

Fire/Release and highlight/ClearHighlight handles

by: Alex del Bondio, June 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5784
description: fire/release playbacks and highlight them.
remarks: For the fire/release part see also Playback - Fire/Release Playbacks from Usernumber

functions

Code

firereleasehighlight.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
<macro id="Macros.test.firepb1" name="test_fire PB1">
  <description>Releases 1-4, fires 1, highlights handle</description>
  <sequence>
    <step pause="0.001">UserMacros.RecallMacroById("Macros.releaseplaybacks")</step>
    <step pause="0.001">UserMacros.RecallMacroById("Macros.clearhandlehighlight")</step>
    <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
    <step>Handles.HighlightHandle(handle:"Location=PlaybackWindow,1,6")</step>
  </sequence>
</macro>
 
<macro id="Macros.releaseplaybacks" name="release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>
 
<macro id="Macros.clearhandlehighlight" name="clear handle highlight">
  <description>clears handle highlight</description>
  <sequence>
    <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,6")</step>
    <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,7")</step>
    <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,8")</step>
    <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,9")</step>
  </sequence>
</macro>
</avolites.macros>

Explanation

The first macro

  1. calls the second macro which releases some playbacks
  2. calls the third macro which clears some highlights (i.e. makes those handles not highlighted)
  3. fires another playback
  4. sets a specified playback handle to highlight

How to use it

Essentially this is an approach to set handles to mutually fire and highlight but would require a lot of predefined handles and macros. It is more a snippet to show how some functions can work together.

You could leave a comment if you were logged in.
macros/example/firereleasehighlightclear.txt · Last modified: 2018/09/09 21:23 by icke_siegen