User Tools

Site Tools


macros:example:releaseplaybackifexistsornot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

macros:example:releaseplaybackifexistsornot [2019/03/10 11:55] (current)
icke_siegen created
Line 1: Line 1:
 +Example
  
 +====== Release playback whether it exists or not (snippet only) ======
 +
 +^ by: | Gregory Haynes, February 2019 |
 +^ published: | http://​forum.avolites.com/​viewtopic.php?​f=20&​t=5997 |
 +^ description:​ | releases a playback (and skips if this playback doesn'​t exist) |
 +^ remarks: | here, the IsClaimed condition is the important part as trying to release a playback that doesn'​t exist would throw a Null Argument exception, see link above. |
 +
 +{{tag>​release playback skip nonexistent}}
 +
 +==== functions ====
 +  * [[:​macros:​function:​Handles.IsClaimed]]
 +  * [[:​macros:​function:​Playbacks.ReleasePlayback]]
 +
 +==== affected properties ====
 +  * [[:​macros:​property:​Playbacks.MasterReleaseTime]]
 +
 +
 +===== Code =====
 +<code xml>
 +<step condition="​Handles.IsClaimed("​cueHandleUN=1"​)">​
 +  Playbacks.ReleasePlayback(userNumber:​1, ​ Playbacks.MasterReleaseTime,​ true)
 +</​step>​
 +</​code>​
 +
 +
 +===== Explanation =====
 +
 +This explains the functional steps within the sequence. For all the other XML details please refer to [[:​macros:​formats_and_syntax#​xml_format|Formats and syntax]]
 +
 +  * ''​Handles.IsClaimed''​ checks whether a handle exists
 +  * if it exists, ''​Playbacks.ReleasePlayback''​ releases this handle
 +
 +The idea was to pre-define a number of handles which would be released by macro.
 +
 +===== How to use it =====
 +
 +Snippet only - adapt and us in your own macros.
 +
 +~~DISCUSSION~~
macros/example/releaseplaybackifexistsornot.txt ยท Last modified: 2019/03/10 11:55 by icke_siegen