Example ====== Change Pages with Timecode ====== ^ by: | Sebastian Beutel, July 2022 | ^ published: | here | ^ description: | change playback pages if enabled (useful with timecode) | ^ remarks: | idea from Discord/Avolites Users#general:\\ Antisthenes — 12.07.2022 \\ triggering or macro question please \\ Is there any way to auto switch the song playback page when corresponding timecode starts? | {{tag>playback page toggle}} ==== functions ==== * [[:macros:function:ActionScript.SetProperty.Boolean]] * [[:macros:function:Handles.Playbacks.ChangePage]] ==== affected properties ==== * [[:macros:property:custom]] ==== control structures ==== * [[macros:control_structures|step condition]] * [[macros:active_binding|]] Here is a file with macros for Playback pages 1~10: {{ :macros:example:timecode2page.xml |}} ===== Code ===== Toggle Pb Pages By Timecode. ActionScript.SetProperty.Boolean("Wiki.Macros.Timecode.TogglePages.Enabled", !Wiki.Macros.Timecode.TogglePages.Enabled) Handles.Playbacks.ChangePage(0) Handles.Playbacks.ChangePage(1) ===== 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 first macro defines a custom variable ''Enabled'', sets it to True by default, and makes it possible to toggle it on/off while showing its status (with [[macros:active_binding|]]). The other macros check if this variable is TRUE and toggle Playbacks to designated pages. ===== How to use it ===== - [[:macros:deploying|make this macro available]] - The first macro can be copied or moved to a macro&executor button and lets you enable/disable the function of the other macros.\\ \\ Then, in order to achieve the intended behaviour:\\ \\ - create a cuelist with as many cues as you need to toggle pages with tracks, and open it in Playback View - into each cue insert the respective macro (click on the ''Macros'' cell, click ''[Add]'', select the macro...) - make this cuelist run by timecode and learn the correct timestamps This way timecode controls this cuelist which in turn controls your Playbacks pages unless this mechanism is disabled. ~~DISCUSSION~~