Example ====== System - Lock Console ====== ^ by: | Mike Vandevoort | ^ published: | February 2018, edited for v15: 2022, Sebastian Beutel | ^ description: | locks the desk | ^ remarks: | put your own unlock code into the macro | {{tag>lock}} ==== functions ==== * [[:macros:function:System.LockConsole]] * [[:macros:function:LockMode.LockConsole]] ===== Code ===== System.LockConsole("1009") LockMode.LockConsole("1009", false) ===== 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]] 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 * if you have ever fat-fingered the console: with this macro you can be sure to always use the correct unlock code ===== 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 - [[:macros:deploying|make this macro available]] ~~DISCUSSION~~