diff options
author | Christian Hesse <mail@eworm.de> | 2018-09-10 22:15:54 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-09-10 22:15:54 +0200 |
commit | 172d789f2a4f350555665173f53f6cd5122cd1a7 (patch) | |
tree | fe7cd5f64346631c9f2bbc3e9ffd40c646b8faa1 /mode-button-scheduler | |
parent | 8f4986af0bb0ecea13594b9ea2bbcfbaa6c8a7e7 (diff) |
add scripts mode-button-{event,scheduler}
Diffstat (limited to 'mode-button-scheduler')
-rw-r--r-- | mode-button-scheduler | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mode-button-scheduler b/mode-button-scheduler new file mode 100644 index 0000000..bf85826 --- /dev/null +++ b/mode-button-scheduler @@ -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; |