aboutsummaryrefslogtreecommitdiffstats
path: root/mode-button-scheduler
blob: 85db78a4e2a9a96258a25e8dc76f3d9782902a2c (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# 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 ($"mode-button"->[ :tostr $count ]);
:local parsed [ :parse $action ];

:set ($"mode-button"->"count") 0;
/ system scheduler remove mode-button-scheduler;

:log info ("Acting on " . $count . " mode-button presses: " . $action);
$parsed;