Created
June 15, 2013 13:32
-
-
Save scottslowe/5788136 to your computer and use it in GitHub Desktop.
This AppleScript moves the selected messages to the specified archive mailbox. You must make sure the mailbox exists; the script doesn't check for its existence.
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
-- This script moves messages to a mailbox for the current year | |
-- Set some default values to be used later in the script | |
property theMailbox : "Archive" | |
-- Handler called when running script from script menu | |
on run | |
tell application "Mail" | |
set theSelectedMessages to selection | |
if ((count of theSelectedMessages) < 1) then | |
beep | |
return | |
end if | |
repeat with theMessage in theSelectedMessages | |
if (read status of theMessage) is false then | |
set read status of theMessage to true | |
end if | |
move theMessage to mailbox theMailbox | |
end repeat | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment