blob: 2306e1e4e857b7998b269374def481b941d4ce8b (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#
# RouterOS script: mode-button-event
# Copyright (c) 2018 Christian Hesse <mail@eworm.de>
#
# run on mode-button event and count button presses
:global "mode-button";
:set ($"mode-button"->"count") ($"mode-button"->"count" + 1);
:if ([ :len [ / system scheduler find where name="mode-button-scheduler" ] ] = 0) do={
:log info "Creating mode-button scheduler...";
/ system scheduler add name=mode-button-scheduler on-event=mode-button-scheduler interval=5s;
}
|