User Tools

Site Tools


macros:example:lockconsole

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:example:lockconsole [2019/04/27 16:54] – [Lock Console] sideshowbondmacros:example:lockconsole [2022/12/11 07:27] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 ^ by: | Mike Vandevoort | ^ by: | Mike Vandevoort |
-^ published: | February 2018 |+^ published: | February 2018, edited for v15: 2022, Sebastian Beutel |
 ^ description: | locks the desk | ^ description: | locks the desk |
 ^ remarks: | put your own unlock code into the macro | ^ remarks: | put your own unlock code into the macro |
Line 12: Line 12:
 ==== functions ==== ==== functions ====
   * [[:macros:function:System.LockConsole]]   * [[:macros:function:System.LockConsole]]
 +  * [[:macros:function:LockMode.LockConsole]]
  
 ===== Code ===== ===== Code =====
 <code xml LockConsole.xml> <code xml LockConsole.xml>
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
-<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd"+<avolites.macros> 
-<!-- M-V Rental 12/07/2017 created by Mike Vandevoort --> + 
-<macro id="Avolites.Macros.LockConsole" name="LockConsole"> +  <!-- M-V Rental 12/07/2017 created by Mike Vandevoort --> 
-  <sequence> +  <macro id="Avolites.Macros.LockConsole" name="LockConsole"> 
-    <step pause="0.01"> +    <sequence> 
-      <!-- change 1009 with the lock code that you want --> +      <step pause="0.01"> 
-      System.LockConsole("1009"+        <!-- change 1009 with the lock code that you want --> 
-    </step> +        System.LockConsole("1009"
-  </sequence> +      </step
-</macro>+    </sequence
 +  </macro> 
 + 
 +  <macro id="Avolites.Macros.LockConsolev15" name="LockConsole v15"> 
 +    <sequence> 
 +      <step> 
 +        <!-- change 1009 with the lock code that you want --> 
 +        LockMode.LockConsole("1009", false) 
 +      </step> 
 +    </sequence> 
 +  </macro> 
 </avolites.macros> </avolites.macros>
 </code> </code>
Line 34: Line 46:
 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]] 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]]
  
-This macros uses the system function System.LockConsole() to lock the console. There are two reaons wy tis may come in very handy:+This macro uses the system function System.LockConsole() resp. LockMode.LockConsole() to lock the console. There are two reaons why this may come in very handy:
   * it is much quicker than the built-in menu: if you assign this macro to a button, you just need to click/press this button to lock the console   * it is much quicker than the built-in menu: if you assign this macro to a button, you just need to click/press this button to lock the console
   * if you have ever fat-fingered the console: with this macro you can be sure to always use the correct unlock code   * if you have ever fat-fingered the console: with this macro you can be sure to always use the correct unlock code
Line 40: Line 52:
 ===== How to use it ===== ===== How to use it =====
  
 +  - depending from software version you need to use the first or the second macro (the other simply does nothing)
   - replace 1009 with your own unlock code   - replace 1009 with your own unlock code
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
macros/example/lockconsole.1556384056.txt.gz · Last modified: 2019/04/27 16:54 by sideshowbond

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki