mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
18 lines
481 B
Text
18 lines
481 B
Text
#!rsc
|
|
# RouterOS script: mode-button-scheduler
|
|
# Copyright (c) 2018-2019 Christian Hesse <mail@eworm.de>
|
|
#
|
|
# act on multiple mode-botton presses from scheduler
|
|
|
|
:global "mode-button";
|
|
|
|
:local count ($"mode-button"->"count");
|
|
:local code ($"mode-button"->[ :tostr $count ]);
|
|
:local parsed [ :parse $code ];
|
|
|
|
:set ($"mode-button"->"count") 0;
|
|
/ system scheduler remove mode-button-scheduler;
|
|
|
|
:log info ("Acting on " . $count . " mode-button presses: " . $code);
|
|
:delay 1s;
|
|
$parsed;
|