Calendar Alarms
CALENDAR
Find
All Calendar Events
where
All the following are true [{'class': 'filter-property', 'value': 'Start Date'}, {'class': 'filter-operator', 'value': 'is today'}] [{'class': 'filter-property', 'value': 'Start Date'}, {'class': 'filter-operator', 'value': 'is greater than'}, {'class': 'filter-benchmark', 'value': 'Current Date', 'glyph': 'assets/cat/Date.svg', 'UUID': ''}]

Calendar Events
CLOCK
Get all alarms
SCRIPTING
Repeat with each item in
Alarms

Repeat Results
SCRIPTING
If
Repeat Item
is
Bedtime
SCRIPTING
Otherwise
CLOCK
Turn
alarm "
Alarm
"
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
If
Calendar Events
has any value
NUMBER
1

Number
SCRIPTING
Repeat with each item in
Calendar Events

Repeat Results
NUMBER
0

Number
VARIABLES
Set variable
NoAlarm
to
Number
CALENDAR
Get
Start Date
from
Repeat Item

Start Date
CALENDAR
Get
End Date
from
Repeat Item

End Date
CALENDAR
Subtract
30
minutes
from
Start Date

Adjusted Date
CALENDAR
Find
All Calendar Events
where
All the following are true [{'class': 'filter-property', 'value': 'Start Date'}, {'class': 'filter-operator', 'value': 'is today'}] [{'class': 'filter-property', 'value': 'End Date'}, {'class': 'filter-operator', 'value': 'is between'}, {'class': 'filter-benchmark', 'value': 'Adjusted Date', 'glyph': '', 'UUID': '2C9906FC-46DD-40E3-A1B4-E56EC3A88F40'}, {'value': 'and'}, {'class': 'filter-benchmark', 'value': 'Start Date', 'glyph': '', 'UUID': '5CB80DC1-E613-4EAF-9C30-1C94A07EDCA9'}]

Calendar Events
SCRIPTING
If
Calendar Events
does not have any value
CALENDAR
Subtract
5
minutes
from
Start Date

Adjusted Date
VARIABLES
Set variable
ATime
to
Adjusted Date
CALENDAR
Get
Title
from
Repeat Item

Title
VARIABLES
Set variable
Title
to
Title
CLOCK
Get all alarms
SCRIPTING
Repeat with each item in
Alarms

Repeat Results
SCRIPTING
If
Repeat Item 2
is
Repeat Item
VARIABLES
Set variable
NoAlarm
to
Number
CLOCK
Turn
alarm "
Alarm
"
1
TEXT
Alarm

Text
VARIABLES
Add
Text
to
AlarmsOn
SCRIPTING
Otherwise
NOTHING
Nothing
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
If
NoAlarm
is
0
NUMBER
1

Number
VARIABLES
Set variable
NoAlarm
to
Number
TEXT
Alarm

Text
VARIABLES
Add
Text
to
AlarmsOn
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Otherwise
SCRIPTING
Show alert
Informational Message
SCRIPTING
End If

If Result
TEXT
Alarms enabled based on calendar events:
AlarmsOn

Text
SCRIPTING
Show
Text
CALENDAR
Get
Detail
from
Text

Details of Calendar Event
Showcuts