User Tools

Site Tools


macros:example:toggletriggermappings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
macros:example:toggletriggermappings [2019/05/05 12:19]
icke_siegen
macros:example:toggletriggermappings [2020/01/26 10:47] (current)
icke_siegen
Line 1: Line 1:
 Example Example
  
-====== Trigger - Toggle Trigger Mappings ======+====== Trigger - Toggle Trigger Mappings v10/v11 ======
  
 ^ by: | Sebastian Beutel | ^ by: | Sebastian Beutel |
Line 7: Line 7:
 ^ description: | Toggles trigger mappings on/off (without entering system mode).| ^ description: | Toggles trigger mappings on/off (without entering system mode).|
 ^ remarks: | Idea from facebook group: https://www.facebook.com/groups/Avolites/permalink/1163736800425219/ | ^ remarks: | Idea from facebook group: https://www.facebook.com/groups/Avolites/permalink/1163736800425219/ |
 +
 +<fs x-large>**This is version dependent**</fs>
 +
 +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}} {{tag>toggle trigger mapping}}
Line 13: Line 17:
   * [[:macros:function: Triggers.ToggleMappingEnable]]   * [[:macros:function: Triggers.ToggleMappingEnable]]
  
-===== Code =====+===== Code v10 =====
 <code xml ToggleTriggerMappings.xml> <code xml ToggleTriggerMappings.xml>
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
Line 58: Line 62:
 </code> </code>
  
 +===== Code v11 =====
 +<code xml ToggleTriggerMappingsV11.xml>
 +<?xml version="1.0" encoding="utf-8"?>
 +<avolites.macros>
 +
 +<!-- from v11 the mapppingIds are titanIds and may change. This may or may not work. -->
 +
 +  <macro id="Avolites.Macros.Triggers.Mapping.Toggle.v11.1" name="Toggle Triggermapping v11 1">
 +    <description>Toggle Triggermapping v11 1.</description>
 +    <sequence>
 +      <step>Triggers.ToggleMappingEnable(1817)</step>
 +    </sequence>
 +  </macro>
 +  
 +  <macro id="Avolites.Macros.Triggers.Mapping.Toggle.v11.2" name="Toggle Triggermapping v11 2">
 +    <description>Toggle Triggermapping v11 2.</description>
 +    <sequence>
 +      <step>Triggers.ToggleMappingEnable(1818)</step>
 +    </sequence>
 +  </macro>
 +  
 +  <macro id="Avolites.Macros.Triggers.Mapping.Toggle.v11.3" name="Toggle Triggermapping v11 3">
 +    <description>Toggle Triggermapping v11 3.</description>
 +    <sequence>
 +      <step>Triggers.ToggleMappingEnable(1819)</step>
 +    </sequence>
 +  </macro>
 +  
 +  <macro id="Avolites.Macros.Triggers.Mapping.Toggle.v11.4" name="Toggle Triggermapping v11 4">
 +    <description>Toggle Triggermapping v11 4.</description>
 +    <sequence>
 +      <step>Triggers.ToggleMappingEnable(1820)</step>
 +    </sequence>
 +  </macro>
 +  
 +</avolites.macros>
 +</code>
  
 ===== Explanation ===== ===== Explanation =====
macros/example/toggletriggermappings.1557058743.txt.gz ยท Last modified: 2019/05/05 12:19 by icke_siegen