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 [[macros:example:firereleaseplayback|]] | {{tag>fire release highlight clear}} ==== functions ==== * [[:macros:function:UserMacros.RecallMacroById]] * [[:macros:function:Playbacks.FirePlaybackAtLevel]] * [[:macros:function:Handles.HighlightHandle]] * [[:macros:function:Playbacks.ReleasePlayback]] * [[:macros:function:Handles.ClearHighlight]] ===== Code ===== Releases 1-4, fires 1, highlights handle UserMacros.RecallMacroById("Macros.releaseplaybacks") UserMacros.RecallMacroById("Macros.clearhandlehighlight") Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true) Handles.HighlightHandle(handle:"Location=PlaybackWindow,1,6") releases Playback 1-4 Playbacks.ReleasePlayback(userNumber: 1, 0, true) Playbacks.ReleasePlayback(userNumber: 2, 0, true) Playbacks.ReleasePlayback(userNumber: 3, 0, true) Playbacks.ReleasePlayback(userNumber: 4, 0, true) clears handle highlight Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,6") Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,7") Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,8") Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,9") ===== Explanation ===== The first macro - calls the second macro which releases some playbacks - calls the third macro which clears some highlights (i.e. makes those handles not highlighted) - fires another playback - sets a specified playback handle to highlight ===== How to use it ===== - [[:macros:deploying|make this macro available]] 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. ~~DISCUSSION~~