Created
April 19, 2009 00:49
-
-
Save jasonrudolph/97849 to your computer and use it in GitHub Desktop.
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
-- Separate your work email from your home email in Mail.app. | |
-- | |
-- Sure, you can use separate mailboxes or smart mailboxes to separate | |
-- your mail, but sometimes you don’t even want to know that you have | |
-- new “home” mail while you’re at work (or vice versa). Sometimes you | |
-- want to work exclusively in one context, free from the distractions | |
-- of the other context: you don’t want to hear that "new mail" chime | |
-- for mail that belongs to other (non-active) contexts, and you don’t | |
-- want to see the "unread" count for mail in other (non-active) | |
-- contexts. Cue Jonathan Wise's "Mail Account Chooser" script. | |
-- | |
-- Adapted from: | |
-- Mail Account Chooser, by Jonathan Wise | |
-- Add user profiles to Mail.app | |
-- http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-using-applescript | |
display dialog "Choose your context for Mail.app" buttons {"Home", "Relevance"} default button 1 with icon note | |
if the button returned of the result is "Home" then | |
tell application "Mail" | |
activate | |
delay 2 | |
set enabled of account "thinkrelevance.com Gmail" to false | |
set enabled of account "jasonrudolph.com Gmail" to true | |
end tell | |
else | |
tell application "Mail" | |
activate | |
delay 2 | |
set enabled of account "thinkrelevance.com Gmail" to true | |
set enabled of account "jasonrudolph.com Gmail" to false | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment