in the following script, I want to set the variable current day equal to system day.
But wether I write "currentday == system day " or "currentday = system day" the compiler does not accept it.
Is there another command to set two variables equal?
Thanks for your help in advance.
Code:
script, determine day, begin
#global variables: set at the beginning of the script collection
#weekday:
## 1 = monday
## 2 = tuesday
## 3 = wednesday
## 4 = thursday
## 5 = friday
## 6 = saturday
## 7 = sunday
## , tuesday, ect.
#current day # the day from 1 to 31, checks if this number changes, because if it does weekday has to be changes
if (system day <> currentday)
then
(
switch (weekday), do
(
case (1) , do # Monday
(
weekday == 2 #Tuesday
currentday = system day
)
case (2), do
(
weekday == 3 #Wednesday
currentday = system day
)
case (3), do
(
weekday == 4 #Thursday
currentday == system day
)
case (4), do
(
weekday == 5 #Friday
currentday == system day
)
case (5), do
(
weekday == 6 #Saturday
currentday == system day
)
case (6), do
(
weekday == 7 #Sunday
currentday == system day
)
case (7), do #Saturday to Sunday
(
weekday == 1 #Monday
currentday == system day
)# Sunday to Monday
)
)
end
#global variables: set at the beginning of the script collection
#weekday:
## 1 = monday
## 2 = tuesday
## 3 = wednesday
## 4 = thursday
## 5 = friday
## 6 = saturday
## 7 = sunday
## , tuesday, ect.
#current day # the day from 1 to 31, checks if this number changes, because if it does weekday has to be changes
if (system day <> currentday)
then
(
switch (weekday), do
(
case (1) , do # Monday
(
weekday == 2 #Tuesday
currentday = system day
)
case (2), do
(
weekday == 3 #Wednesday
currentday = system day
)
case (3), do
(
weekday == 4 #Thursday
currentday == system day
)
case (4), do
(
weekday == 5 #Friday
currentday == system day
)
case (5), do
(
weekday == 6 #Saturday
currentday == system day
)
case (6), do
(
weekday == 7 #Sunday
currentday == system day
)
case (7), do #Saturday to Sunday
(
weekday == 1 #Monday
currentday == system day
)# Sunday to Monday
)
)
end



