User Tools

Site Tools


macros:example:recordtofixedlocation

Example

Playback - Record to fixed location

by: Gregory Haynes, June 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5786
description: Records a playback to a predefined location.
Temporarily stores current playback page and toggled back to it after record.

The intention is to store a playback to a certain playback page which is not the current one. StoreCue() (and other functions) only accepts the handlegroup and index, automaticall using the current page. The solution is to temporarily store the current page index, then toggle to the target page, store there, and finally toggle back to the current page.

functions

affected properties

Code

<sequence>
  <step>ActionScript.SetProperty("UserMacros.CurrentUserNumber", Handles.PlaybackWindow.Page.Index)</step>
  <step>Handles.PlaybackWindow.ChangePage(1)</step>
  <step>ActionScript.SetProperty("Playbacks.PendingLegend", Handles.PlaybackWindow.Page.DisplayName)</step>
  <step>Playbacks.StoreCue("PlaybackWindow", 20, false)</step>
  <step>Handles.PlaybackWindow.ChangePage(UserMacros.CurrentUserNumber)</step>
</sequence>

Explanation

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

This uses the UserMacros.CurrentUserNumber property, which is an integer, as a temporary store for the original page index so that page can be restored later. In the example the legend of the playback is also set to the name of the page it is on; not a useful thing to do but there to demonstrate what you can do.

Pages have the following properties:
- Index: The internal page index, starts from zero.
- DisplayIndex: The page number that is displayed to the user, normally starts from one except for the preset pages on the Pearl Expert.
- Name: The legend of the page.
- DisplayName: The legend of the page if it has been set otherwise the display index.

How to use it

This is only a snippet and not a fully functional macro, only shown for documentation.

You could leave a comment if you were logged in.
macros/example/recordtofixedlocation.txt · Last modified: 2019/04/27 19:38 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki