mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-05 07:34:30 +02:00
add scripts mode-button-{event,scheduler}
This commit is contained in:
parent
8f4986af0b
commit
172d789f2a
3 changed files with 38 additions and 0 deletions
16
mode-button-scheduler
Normal file
16
mode-button-scheduler
Normal file
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# RouterOS script: mode-button-scheduler
|
||||
# Copyright (c) 2018 Christian Hesse <mail@eworm.de>
|
||||
#
|
||||
# act on multiple mode-botton presses from scheduler
|
||||
|
||||
:global "mode-button";
|
||||
|
||||
:local count ($"mode-button"->"count");
|
||||
:local action [ :parse ($"mode-button"->[ :tostr $count ]) ];
|
||||
|
||||
:set ($"mode-button"->"count") 0;
|
||||
/ system scheduler remove mode-button-scheduler;
|
||||
|
||||
:log info ("Acting on " . $count . " mode-button presses.");
|
||||
$action;
|
Loading…
Add table
Add a link
Reference in a new issue