Example ====== Legend - Get a cuelist cue's legend ====== ^ by: | Kim Wida, April 2018 | ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=5662 | ^ description: | Get Specific Cue Legend In A Cuelist | ^ remarks: | How can I get second or third cue's legend in the cuelist?? \\ I am trying to make a macro which show currently running cue's legend to the cuelist legend. \\ For understanding. There is a cuelist which has "Colour" legend. It has 4 cues and each cue have "Red", "Green", "Blue" and "White" legend. \\ What I want is when I fire the cuelist, cuelist legend change "Colour" to "Red". Then "Red" to "Green"... like this. | {{tag>get cuelist cue legend}} ==== functions ==== * [[:macros:function:ConnectedPlayback.Connect]] * [[:macros:function:Handles.GetHandle]] * [[:macros:function:Handles.SetSourceHandleFromHandle]] * [[:macros:function:Playbacks.FillCueLegend]] * [[:macros:function:Math.Cast.ToSingle]] * [[:macros:function:Handles.SetLegend]] * [[:macros:function:Handles.ClearSelection]] ==== affected properties ==== * [[:macros:property:CueLists.LiveCueNumber]] * [[:macros:property:Handles.PendingLegend]] ===== Code ===== ConnectedPlayback.Connect(Handles.GetHandle("PlaybackWindow",0,76)) Handles.SetSourceHandleFromHandle(Handles.GetHandle("PlaybackWindow",0,76)) Playbacks.FillCueLegend( Handles.GetHandle("PlaybackWindow",0,76), Math.Cast.ToSingle(CueLists.LiveCueNumber), "Handles.PendingLegend" ) Handles.SetLegend() Handles.ClearSelection() ===== Explanation ===== * ''ConnectedPlayback.Connect'' connects to a specific playback * ''Handles.SetSourceHandleFromHandle'' selects this playback to set its legend * ''Playbacks.FillCueLegend'' gets a specific cue's legnd and feeds this into the property 'PendingLegend' to set it in the next step * ''Handles.SetLegend'' sets the cuelist's legend to the current cue's legend >If you didn't put cue legend of the cuelist, it will show default cuelist name. >You could use "CueLists.LiveCueNumber +1", if you want to see next cue. This is only a code snippet and not operational within itself. Listed here for documentation ~~DISCUSSION~~