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 ===== Playbacks.ReleasePlayback(userNumber:1, Playbacks.MasterReleaseTime, true) ===== 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~~