Example ====== Trigger - Toggle Trigger Mappings v10/v11 ====== ^ by: | Sebastian Beutel | ^ published: | January 2018 | ^ description: | Toggles trigger mappings on/off (without entering system mode).| ^ remarks: | Idea from facebook group: https://www.facebook.com/groups/Avolites/permalink/1163736800425219/ | **This is version dependent** The way how Titan assigns IDs to mappings has changed. In short, in Titan v10 the macro works with ''Triggers.ToggleMappingEnable(2)''. In Titan v11 try something like ''Triggers.ToggleMappingEnable(1817)''. From Titan v12, use ''Triggers.ToggleMappingEnabledByHandle'' instead and define the mapping by its user number. See [[:macros:function: Triggers.ToggleMappingEnable]] for details. {{tag>toggle trigger mapping}} ==== functions ==== * [[:macros:function: Triggers.ToggleMappingEnable]] ===== Code v10 ===== Toggle Triggermapping 1. Triggers.ToggleMappingEnable(2) Toggle Triggermapping 2. Triggers.ToggleMappingEnable(3) Toggle Triggermapping 3. Triggers.ToggleMappingEnable(4) Toggle Triggermapping 4. Triggers.ToggleMappingEnable(5) Toggle Triggermapping 5. Triggers.ToggleMappingEnable(6) ===== Code v11 ===== Toggle Triggermapping v11 1. Triggers.ToggleMappingEnable(1817) Toggle Triggermapping v11 2. Triggers.ToggleMappingEnable(1818) Toggle Triggermapping v11 3. Triggers.ToggleMappingEnable(1819) Toggle Triggermapping v11 4. Triggers.ToggleMappingEnable(1820) ===== 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 macros use the function [[macros:function:Triggers.ToggleMappingEnable]] to enable/disable trigger mappings. The first two mappings are predefined and cannot be altered, thus the user-defined mappings start with ID 2. //N.B. currently it is not possible to show whether a specific mapping is enabled using [[macros:active_binding]] as this requires a property, but there are no properties available for this purpose. (thanks to Gregory Haynes for explaining this)// ===== How to use it ===== * [[:macros:deploying|make this macro available]] * use the macros to toggle on/off the trigger mappings without entering system mode ~~DISCUSSION~~