Created
June 20, 2013 21:16
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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