Update for v1.03

This commit is contained in:
Wifinigel 2023-05-29 07:47:33 +01:00
parent 086e3e6f1d
commit e694bc14f9
22 changed files with 22 additions and 22 deletions

View file

@ -25,7 +25,7 @@ if ( [:typeof $WanInterfaces] != "array") do={
:local InterfaceId [/interface ethernet find name=$WanInterface]; :local InterfaceId [/interface ethernet find name=$WanInterface];
:local UpDown "down"; :local UpDown "down";
if ([:interface ethernet get $InterfaceId]->"running") do={ if ([/interface ethernet get $InterfaceId]->"running") do={
:set UpDown "up" :set UpDown "up"
} }

View file

@ -4,7 +4,7 @@
:put "Hello, I hope you're well."; :put "Hello, I hope you're well.";
# Check if the time is after 6pm (get time in 21:46:04 format) # Check if the time is after 6pm (get time in 21:46:04 format)
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Say good evening if time is after 18:00 # Say good evening if time is after 18:00

View file

@ -4,7 +4,7 @@
:put "Hello, I hope you're well."; :put "Hello, I hope you're well.";
# Check if the time is after 6pm (get time in 21:46:04 format) # Check if the time is after 6pm (get time in 21:46:04 format)
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Say good morning if time is before 12:00 # Say good morning if time is before 12:00

View file

@ -1,7 +1,7 @@
# filename: ch7-04-if-else-vars.rsc # filename: ch7-04-if-else-vars.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Check if it's after noon # Check if it's after noon

View file

@ -1,7 +1,7 @@
# filename: ch7-05-if-else-vars2.rsc # filename: ch7-05-if-else-vars2.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -1,7 +1,7 @@
# filename: ch7-06-multiple-conditions.rsc # filename: ch7-06-multiple-conditions.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -1,7 +1,7 @@
# filename: ch7-07-nested-if-statements.rsc # filename: ch7-07-nested-if-statements.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -8,7 +8,7 @@
:local UpDown; :local UpDown;
if ([:interface ethernet get $InterfaceId]->"running") do={ if ([/interface ethernet get $InterfaceId]->"running") do={
:set UpDown "up"; :set UpDown "up";
} else={ } else={
:set UpDown "down"; :set UpDown "down";

View file

@ -7,7 +7,7 @@
:local InterfaceId [/interface ethernet find name=$WanInterfaceName]; :local InterfaceId [/interface ethernet find name=$WanInterfaceName];
:local UpDown "down"; :local UpDown "down";
if ([:interface ethernet get $InterfaceId]->"running") do={ if ([/interface ethernet get $InterfaceId]->"running") do={
:set UpDown "up" :set UpDown "up"
} }

View file

@ -13,7 +13,7 @@
:set LoopCounter ($LoopCounter - 1); :set LoopCounter ($LoopCounter - 1);
# add in a pause to prevent cpu thrashing # add in a pause to prevent cpu thrashing
delay 1; :delay 1;
} }
# print a message when/if the loop exits # print a message when/if the loop exits

View file

@ -1,4 +1,4 @@
# filename: ch8-06-while-with-exit.rsc # filename: ch8-07-while-with-exit.rsc
# Let's create a loop using "while" # Let's create a loop using "while"

View file

@ -25,7 +25,7 @@ if ( [:typeof $WanInterfaces] != "array") do={
:local InterfaceId [/interface/ethernet find name=$WanInterface]; :local InterfaceId [/interface/ethernet find name=$WanInterface];
:local UpDown "down"; :local UpDown "down";
if ([:interface/ethernet get $InterfaceId]->"running") do={ if ([/interface/ethernet get $InterfaceId]->"running") do={
:set UpDown "up" :set UpDown "up"
} }

View file

@ -4,7 +4,7 @@
:put "Hello, I hope you're well."; :put "Hello, I hope you're well.";
# Check if the time is after 6pm (get time in 21:46:04 format) # Check if the time is after 6pm (get time in 21:46:04 format)
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Say good evening if time is after 18:00 # Say good evening if time is after 18:00

View file

@ -4,7 +4,7 @@
:put "Hello, I hope you're well."; :put "Hello, I hope you're well.";
# Check if the time is after 6pm (get time in 21:46:04 format) # Check if the time is after 6pm (get time in 21:46:04 format)
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Say good morning if time is before 12:00 # Say good morning if time is before 12:00

View file

@ -1,7 +1,7 @@
# filename: ch7-04-if-else-vars.rsc # filename: ch7-04-if-else-vars.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# Check if it's after noon # Check if it's after noon

View file

@ -1,7 +1,7 @@
# filename: ch7-05-if-else-vars2.rsc # filename: ch7-05-if-else-vars2.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -1,7 +1,7 @@
# filename: ch7-06-multiple-conditions.rsc # filename: ch7-06-multiple-conditions.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -1,7 +1,7 @@
# filename: ch7-07-nested-if-statements.rsc # filename: ch7-07-nested-if-statements.rsc
# Get the current time # Get the current time
:local CurrentTime [:system clock get time]; :local CurrentTime [/system clock get time];
:put "The current time is : $CurrentTime"; :put "The current time is : $CurrentTime";
# declare the time of day variable # declare the time of day variable

View file

@ -8,7 +8,7 @@
:local UpDown; :local UpDown;
if ([:interface ethernet get $InterfaceId]->"running") do={ if ([/interface ethernet get $InterfaceId]->"running") do={
:set UpDown "up"; :set UpDown "up";
} else={ } else={
:set UpDown "down"; :set UpDown "down";

View file

@ -7,7 +7,7 @@
:local InterfaceId [/interface/ethernet find name=$WanInterfaceName]; :local InterfaceId [/interface/ethernet find name=$WanInterfaceName];
:local UpDown "down"; :local UpDown "down";
if ([:interface/ethernet get $InterfaceId]->"running") do={ if ([/interface/ethernet get $InterfaceId]->"running") do={
:set UpDown "up" :set UpDown "up"
} }

View file

@ -13,7 +13,7 @@
:set LoopCounter ($LoopCounter - 1); :set LoopCounter ($LoopCounter - 1);
# add in a pause to prevent cpu thrashing # add in a pause to prevent cpu thrashing
delay 1; :delay 1;
} }
# print a message when/if the loop exits # print a message when/if the loop exits

View file

@ -1,4 +1,4 @@
# filename: ch8-06-while-with-exit.rsc # filename: ch8-07-while-with-exit.rsc
# Let's create a loop using "while" # Let's create a loop using "while"