Work Calendar Alarms
TEXT
Work

Text
NUMBER
90

Number
CALENDAR
Find
All Calendar Events
where
All the following are true [{'class': 'filter-property', 'value': 'Start Date'}, {'class': 'filter-operator', 'value': 'is in the next'}, {'class': 'filter-benchmark', 'value': '1', 'glyph': '', 'UUID': ''}, {'class': 'filter-unit', 'value': 'day', 'glyph': '', 'UUID': ''}] [{'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': ''}] [{'class': 'filter-property', 'value': 'Title'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark inline', 'value': [{'class': 'magic', 'value': 'EventName', 'glyph': '', 'UUID': '7DF58BC3-1211-45F2-9A35-67C9621A7399'}]}]

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
Subtract
0
seconds
from
Start Date

Adjusted Date
VARIABLES
Set variable
ATime
to
Adjusted Date
VARIABLES
Set variable
Title
to
Repeat Item
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
alarm enabled based on calendar;
Alarm time is:
Repeat Item
;
Work begins at:
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
alarm enabled based on calendar;
Alarm time is:
Repeat Item
;
Work begins at:
Alarm
Enjoy your sleep!

Text
VARIABLES
Add
Text
to
AlarmsOn
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
TEXT
AlarmsOn

Text
SCRIPTING
Otherwise
TEXT
No work tomorrow

Text
SCRIPTING
End If

If Result
DOCUMENTS
Speak
If Result
Language
English (United States)
DOCUMENTS
Show
If Result
in Quick Look
Showcuts