[Remind-Fans] syntax help
Eben King
eben at gmx.us
Thu Jul 20 14:00:48 EDT 2023
OK. Here's the situation. I have movie nights twice a week, "Movie Night"
on Friday, and "Auxiliary Movie Night" on Tuesday. On Tuesday, Mom always
chooses the movie, and on Friday we alternate between me (Eben) and the wife
(Amanda). So I want to make a function that spits out the right name,
depending on what day it is.
Tuesday is easy, it's always Mom. Friday, the easiest solution I can come
up with is to check if the date odd or even. So far this is what I have:
13 FSET moviechooser(d) \
14 IF d == "tuesday" \
15 "Mom" \
16 else \
17 IF d == "friday" \
18 "one of us" \
19 endif \
20 endif
21
22 REM Friday AT 20:45 RUN xmessage "Get stuff ready for a
movie.%"Movie night [moviechooser(realtoday())]%"
23 REM Tuesday AT 19:45 RUN xmessage "Get stuff ready for a
movie.%"Auxiliary movie night [moviechooser(realtoday())]%"
I get
/home/eben/.reminders/weekly.rem(22): Undefined variable: IF
/home/eben/.reminders/weekly.rem(21): Undefined variable: IF
/home/eben/.reminders/weekly.rem(22): Undefined variable: IF
/home/eben/.reminders/weekly.rem(21): Undefined variable: IF
/home/eben/.reminders/weekly.rem(22): Undefined variable: IF
/home/eben/.reminders/weekly.rem(21): Undefined variable: IF
Complaints are probably about lines 22 and 23. I must have modified the
file after running remind.
Anyhow, I get errors, so it looks like my syntax is bad. Is there a more
succinct way of getting a day counter other than by doing realtoday() -
2000-01-01 ? Thanks.
--
People who are willing to rely on the government to keep them safe
are pretty much standing on Darwin's mat,
pounding on the door, screaming, "Take me, take me!"
-- Carl Jacobs on ASR
More information about the Remind-fans
mailing list