Created
June 27, 2012 05:08
-
-
Save peelman/3001622 to your computer and use it in GitHub Desktop.
Alfred Extension: Flag a Message with Reminder
This file contains 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
-- 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