mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-07-28 14:44:59 +02:00
Intial Commit. First Release
This commit is contained in:
parent
1508f05bc0
commit
e2280aad84
4 changed files with 50 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Changes LCD mode based on time schedule
|
||||
|
||||
:global ChangeLcd do={
|
||||
|
||||
:local systemTime [/system clock get value-name=time];
|
||||
:local lcdMode [/lcd get color-scheme];
|
||||
|
||||
:local lightModeStart $lightModeStartTime;
|
||||
:local darkModeStart $darkModeStartTime;
|
||||
|
||||
:if ($systemTime = $lightModeStart && $lcdMode = "dark") do={
|
||||
|
||||
/lcd set color-scheme=light;
|
||||
/log info "..::Changed LCD mode to LIGHT::.."
|
||||
|
||||
}
|
||||
:if ($systemTime = $darkModeStart && $lcdMode = "light") do={
|
||||
|
||||
/lcd set color-scheme=light;
|
||||
/log info "..::Changed LCD mode to DARK::.."
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$ChangeLcd lightModeStartTime="08:00:00" darkModeStartTime="17:00:00";
|
Loading…
Add table
Add a link
Reference in a new issue