Skip to content

Instantly share code, notes, and snippets.

@roderik
Created July 29, 2012 18:46
Show Gist options
  • Select an option

  • Save roderik/3201059 to your computer and use it in GitHub Desktop.

Select an option

Save roderik/3201059 to your computer and use it in GitHub Desktop.
tell application "Mail"
using terms from application "Mail"
set selectedMails to selection
set theMessage to first item of selectedMails
set theBody to "message:%3C" & message id of theMessage & "%3E"
set theSubject to the subject of theMessage & " (From " & the sender of theMessage & ")"
tell application "Reminders"
set theList to list "Inbox"
set newToDo to make new reminder with properties {name:theSubject, body:theBody, container:theList}
end tell
do shell script "/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -message 'Task Created:" & theSubject & "' -title 'Mail 2 Reminders' -activate 'com.apple.reminders'"
end using terms from
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment