Skip to content

Instantly share code, notes, and snippets.

@peelman
Created June 27, 2012 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peelman/3001622 to your computer and use it in GitHub Desktop.
Save peelman/3001622 to your computer and use it in GitHub Desktop.
Alfred Extension: Flag a Message with Reminder
-- Flag a Message and Set a Reminder
-- https://gist.github.com/3001622
-- ©2012 Nick Peelman http://peelman.us
--
-- Thanks to Don Southard for his Create Reminders Task
-- http://dirtdon.com
set tomorrow to ((current date) + (1 * days))
tell application "Mail"
set manyMessages to selection
repeat with aMessage in manyMessages
set aSubject to subject of aMessage
set anIndex to the message id of aMessage
set aURL to "message:%3c" & anIndex & "%3e"
set flag index of aMessage to 3
tell application "Reminders"
tell default list
make new reminder with properties ¬
{name:aSubject, remind me date:tomorrow, body:aURL}
end tell
end tell
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment