mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-14 20:14:30 +02:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
16
scripts/ch7-01-basic-if.rsc
Normal file
16
scripts/ch7-01-basic-if.rsc
Normal file
|
@ -0,0 +1,16 @@
|
|||
# filename: ch7-01-basic-if.rsc
|
||||
|
||||
# Print a greeting
|
||||
:put "Hello, I hope you're well.";
|
||||
|
||||
# Check if the time is after 6pm (get time in 21:46:04 format)
|
||||
:local CurrentTime [:system clock get time];
|
||||
:put "The current time is : $CurrentTime";
|
||||
|
||||
# Say good evening if time is after 18:00
|
||||
:if ($CurrentTime > 18:00) do={
|
||||
:put "Good evening!";
|
||||
}
|
||||
|
||||
# Say goodbye
|
||||
:put "Thanks for visiting, bye!";
|
Loading…
Add table
Add a link
Reference in a new issue