Skip to content

Instantly share code, notes, and snippets.

@samo9789
Created June 20, 2013 21:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samo9789/5826730 to your computer and use it in GitHub Desktop.
Save samo9789/5826730 to your computer and use it in GitHub Desktop.
List the day's reminders (from the Apple Reminders App) using Apple Script
tell application "Reminders"
set output to ""
set output to output & "Reminders for " & weekday of (current date) & ":"
set myList to "Reminders"
set hasOne to false
if (count of (reminders in list myList whose completed is false)) > 0 then
set todoList to reminders in list myList whose completed is false
repeat with itemNum from 1 to (count of (reminders in list myList whose completed is false))
set reminderObj to item itemNum of todoList
set nameObj to name of reminderObj
set compDateObj to due date of reminderObj
if (compDateObj is not missing value) then
set dayInt to day of compDateObj
set monthInt to month of compDateObj as integer
set yearInt to year of compDateObj
if (dayInt = day of (current date) and monthInt = month of (current date) as integer and yearInt = year of (current date)) then
if hasOne is false then
set output to output & linefeed & "Reminders:" & linefeed
set hasOne to true
end if
set output to output & "• " & nameObj
end if
end if
end repeat
else
--set output to output & "No Reminders for Today"
end if
return output
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment