Example ====== Programmer - Park/Restore/Swop ====== ^ by: | Sebastian Beutel, June 2018 | ^ published: | here | ^ description: | Emulate dual programmer: \\ - park programmer \\ - restore programmer \\ - swop programmer | {{tag>park restore swop programmer}} ==== functions ==== * [[:macros:function:Handles.SetSourceHandle]] * [[:macros:function:Handles.ConfirmDelete]] * [[:macros:function:ActionScript.SetProperty]] * [[:macros:function:ActionScript.SetProperty.Enum]] * [[:macros:function:Playbacks.StoreCue]] * [[:macros:function:Programmer.Editor.Clear]] * [[:macros:function:Handles.SetUserNumber]] * [[:macros:function:Handles.SetLegend]] * [[:macros:function:Handles.ClearSelection]] * [[:macros:function:Include.SelectPlayback]] * [[:macros:function:Handles.CopyDestination]] ==== affected properties ==== * [[:macros:property:Expert.RecordPlayback.RecordMode.ModeOnEnter]] * [[:macros:property:Playbacks.RecordMode]] * [[:macros:property:Handles.CurrentUserNumber]] * [[:macros:property:Handles.PendingLegend]] * [[:macros:property:Handles.OperationMode]] ===== Code ===== Park Programmer to a playback Handles.SetSourceHandle("Macros", 1000) Handles.ConfirmDelete() ActionScript.SetProperty("Expert.RecordPlayback.RecordMode.ModeOnEnter", Playbacks.RecordMode) ActionScript.SetProperty.Enum("Playbacks.RecordMode", "RecordCueModeProgrammer") Playbacks.StoreCue("Macros", 1000, false) Programmer.Editor.Clear(255, true, false, 0) ActionScript.SetProperty("Playbacks.RecordMode", Expert.RecordPlayback.RecordMode.ModeOnEnter) Handles.SetSourceHandle("Macros", 1000) ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:10000) Handles.SetUserNumber() ActionScript.SetProperty("Handles.PendingLegend", "Parked Programmer") Handles.SetLegend() Handles.ClearSelection() Restore Programmer from a playback Programmer.Editor.Clear(255, true, false, 0) Include.SelectPlayback("Macros", 1000) Swop programmer with previously parked programmer Handles.SetSourceHandle("Macros", 1001) Handles.ConfirmDelete() ActionScript.SetProperty("Expert.RecordPlayback.RecordMode.ModeOnEnter", Playbacks.RecordMode) ActionScript.SetProperty.Enum("Playbacks.RecordMode", "RecordCueModeProgrammer") Playbacks.StoreCue("Macros", 1001, false) ActionScript.SetProperty("Playbacks.RecordMode", Expert.RecordPlayback.RecordMode.ModeOnEnter) Programmer.Editor.Clear(255, true, false, 0) Include.SelectPlayback("Macros", 1000) Handles.SetSourceHandle("Macros", 1000) Handles.ConfirmDelete() Handles.SetSourceHandle("Macros", 1001) ActionScript.SetProperty.Enum("Handles.OperationMode", "move") Handles.CopyDestination("Macros", 1000) Handles.ClearSelection() Handles.SetSourceHandle("Macros", 1000) ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:10000) Handles.SetUserNumber() ActionScript.SetProperty("Handles.PendingLegend", "Parked Programmer") Handles.SetLegend() Handles.ClearSelection() ===== 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]] The macro **SB Park Programmer** parks the current contents of the programmer into a cue playback (group Macros, index 1000): * the playback is deleted (just in case) * the current Record mode ist stored in a property, and Record mode set to 'Programmer' * the programmer is stored into that cue, and then cleared * the Record mode is restored to what it was before storing the cue, from the temporary property * finally, usernumber is set to 10000, the legend is set to 'Parked Programmer', and the selection is cleared. The macro **SB Restore Programmer** restores the programmer from the temp playback: * the programmer is cleared * the temp cue is included The macro **SB Swop Programmer** swops the programmer with the temp cue: * the current programmer is stored into a cue playback (Macros 1001), see above * the programmer is cleared and the 'old' temp cue is included (see above) * the old temp cue is deleted and the new one moved to replace the old one * finally, usernumber is set to 10000, the legend is set to 'Parked Programmer', and the selection is cleared. ===== How to use it ===== - [[:macros:deploying|make this macro available]] - put the macros onto easy-to-reach buttons to quickly juggle with your programmer - very helpful for complex programming tasks. ~~DISCUSSION~~