Skip to content

Instantly share code, notes, and snippets.

@poritsky
Created March 21, 2013 04:53
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 poritsky/5210778 to your computer and use it in GitHub Desktop.
Save poritsky/5210778 to your computer and use it in GitHub Desktop.
Open Mail Preferences and select the "Rules" pane. Because using a mouse is so 2012.
tell application "System Events"
tell process "Mail"
tell menu bar 1
tell menu "Mail"
click menu item "Preferences…"
end tell
end tell
end tell
end tell
tell application "System Events"
tell process "Mail"
tell window 1
tell tool bar 1
tell button "Rules"
perform action "AXPress"
end tell
end tell
end tell
end tell
end tell
@n8henrie
Copy link

Nice work!

@poritsky
Copy link
Author

Hey thanks. Really I'd like it to edit a specific rule, but for now I'm adding this to a Mail Act-On rule so a keystroke will take me straight to the rules menu. A start...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment