10.5: Quick note creation in Mail via AppleScript

Jul 09, '08 07:30:01AM

Contributed by: gcarnold

I'm always searching for something to write on when I want to take a quick note. I know that Mail in 10.5 includes a note function, but it's usually been too much trouble to launch Mail and then navigate the menus to select a new note.

So I finally put together this little AppleScript that I use with Quicksilver's hotkeys to launch a new note with just one keystroke:

tell application "Mail"
  activate
end tell

tell application "System Events"
  tell process "Mail"
    click the menu item "New Note" of the menu "File" of menu bar 1
  end tell
end tell
I save the script as an application, and assign it to the F7 key in Quicksilver. Now when I need to take a quick note, it's just one key press away. As an alternative to using Quicksilver's hotkey, this script can be saved as an application and placed in the Dock, making a new note just one click away.

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080707160311715