User Tools

Site Tools


macros:example:playbacktoggletimecode

Example

Timecode - Toggle On/Off for particular playback

by: Gregory Haynes, May 2016
published: http://forum.avolites.com/viewtopic.php?f=20&t=4517
description: Toggle whether the cue list on handle 1 of the current page is enabled for timecode.
remarks: The original idea was to toggle a cuelist which is identified by its legend - but that's not possible. Greg writes 'I don't think there is a way to do this at the moment. I found a way of toggling a playback based on its location but it uses the current page, you could use the Playbacks window instead (which would be “PlaybackWindow”).'

functions

Code

togglePbTimecode.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <macro id="UserMacro.TogglePlaybackTimecode">
    <name>Toggle Timecode Enabled</name>
    <description>Toggle whether the cue list on handle 1 of the current page is enabled for timecode.</description>
    <sequence>
      <step>Handles.SetSourceHandle("Playbacks", 0)</step>
      <step>Playbacks.Timecode.ToggleEnabled.Handle(Handles.SourceHandle)</step>
      <step>Handles.SetSourceHandleFromHandle(null)</step>
    </sequence>
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

  • Handles.SetSourceHandle(“Playbacks”, 0) makes the playback 1 the source handle
  • Playbacks.Timecode.ToggleEnabled.Handle(Handles.SourceHandle) toggles the Timecode.Enabled setting of this handle - this is the 'Connected Cuelists' toggle button in the Timecode menu
  • Handles.SetSourceHandleFromHandle(null) empties the source handle property.

How to use it

  • create a cuelist on playback 1
  • open the [Timecode] menu
  • go to [Connected Cue Lists] - the button [Cue List Playbacks[1]] is inactive
  • <Exit> (the macro doesn't run as long as we are in this menu)
  • fire the macro
  • go to [Connected Cue Lists] - the button [Cue List Playbacks[1]] is now active

Discussion

icke_siegen, 2017/11/20 17:39

Tested in Titan 10.1 - works as expected.

You could leave a comment if you were logged in.
macros/example/playbacktoggletimecode.txt · Last modified: 2019/01/15 03:20 by sideshowbond