Skip to content

Instantly share code, notes, and snippets.

@GeekAndDad
Last active September 25, 2020 19:02
Show Gist options
  • Save GeekAndDad/133be8f4c357dea30bb6836a7039299d to your computer and use it in GitHub Desktop.
Save GeekAndDad/133be8f4c357dea30bb6836a7039299d to your computer and use it in GitHub Desktop.
Hacked together AppleScript to get a list from Reminders and make a new TextEdit document with the items in the list suitable for printing.
tell application "Reminders"
set listNames to {}
repeat with aList in lists
copy name of aList to end of listNames
end repeat
set listName to choose from list listNames with prompt "Select the list to print:"
-- now find list object for the choosen list
set listToPrint to ""
repeat with aList in lists
if name of aList as string is equal to listName as string then
set listToPrint to aList
exit repeat
end if
end repeat
-- log name of listToPrint as string
-- get a list of the names of all the reminders
set listItems to reminders of listToPrint
set reminderStrings to {}
repeat with aReminder in listItems
if aReminder is not completed then
set reminderText to name of aReminder as string
copy ("[ ] " & reminderText) to end of reminderStrings
end if
end repeat
-- make a single string out of the list of reminders
set TID to AppleScript's text item delimiters
set AppleScript's text item delimiters to "
"
set listText to reminderStrings as text
set AppleScript's text item delimiters to TID
log listText
set listText to ((name of listToPrint as string) & return & return & listText)
-- make a new text edit document to print
tell application "TextEdit"
make new document
set text of front document to listText
-- prints to your default printer
-- commented out since you may want to set formatting first.
-- print front document
end tell
end tell
@jusup0
Copy link

jusup0 commented May 29, 2020

Ok. Another idea, would I be able to turn a note into a reminder (using AppleScript) then extract the image from the note?

@GeekAndDad
Copy link
Author

I don't see it documented in the dictionary. Not an AppleScript expert, but if it's not documented in the AppleScript dictionary I don't know how you'd access the image from AppleScript.

Copy of an item in Reminders and then pasting it into another app doesn't even work. This is not a well-behaved Mac app. Filing feedback at http://feedbackassistant.apple.com to ask for improvements is about your only hope (slim and slow though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment