How to make global hotkey for new mail message (keeping mail hidden)?

Discussion in 'OS X' started by ZestyOne, Dec 20, 2010.

  1. macrumors member

    ZestyOne

    Joined:
    Oct 18, 2009
    Location:
    Paradise
    #1
    Hey,
    I see there are a few apps such as cockpit and keyboard maestro that handle global hotkeys, however I would like to figure out a free solution. I have quicksilver but the mail plugin hardly cuts it for effectiveness and functionality.

    Basically I'd like to just have a hotkey (any available function keys after F12 for instance), that when I push it, it opens up a "New Mail" message for OSX Mail, without having to go to mail, hitting new, typing out message then hiding mail (it pops up along with new mail).

    I do a lot of programming and design and it would be great to do this as I send out like 50 emails a day ( :eek:!!)

    Thanks!
     
  2. macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #2
    Just tried this and it's relatively simple.

    Step 1: Create a service in Automator
    a) Open Automator
    b) Select Service template
    c) On the right hand side, use the pull down menus to make it say "Services receives no input in any application.
    d) From the left hand panel select Mail, then drag "New Mail Message" to the right hand panel.
    e) Save, give it a name like "New Mail Message"

    Step 2: Create a keyboard shortcut
    a) Open System Preferences
    b) Select Keyboard
    c) Select Keyboard Shortcut
    d) Select Services
    e) Find "New Mail Message" in the list, add keyboard shortcut (I used Shift+Apple+M) by clicking to the right of the name.

    Step 3: Check that it works. (You can also launch it by clicking on AppName->Services->New Mail Message in the menu bar of any App.
    Note, if Mail isn't running, Mail will launch and then create a New Message.
     
  3. thread starter macrumors member

    ZestyOne

    Joined:
    Oct 18, 2009
    Location:
    Paradise
    #3
    Thanks, that was extremely helpful :cool:
     
  4. thread starter macrumors member

    ZestyOne

    Joined:
    Oct 18, 2009
    Location:
    Paradise
    #4
    One minor tweak, is there a way I can use applescript to hide the application for mail (the inbox) without hiding the actual New Mail window that I just popped up?

    I tried googling applescript but this hides the entire mail app, including the new mail window.

    Code:
    on run {input, parameters}
    	
    	tell application "System Events"
    		set visible of process "Mail" to false
    	end tell
    	
    	return input
    end run
     
  5. macrumors newbie

    Joined:
    Dec 27, 2010
    #5
    I know this is an old thread and you probably figured out a solution, but for the benefit of all the readers out there, you can just simply minimize the message viewer window. As a result, the message viewer will not pop up every time you use the shortcut to compose a new message.

    If you want to easily bring the message viewer back up again, you can set up a shortcut:
    1) Go back to the Keyboard Shortcuts window in System Preferences (as described above)
    2) Click on Application Shortcuts in the pane on the left, and then click on the + to add a new shortcut
    3) Under the Application: drop down menu, select Mail.app. Type "Message Viewer" (without quotes) in the Menu Title: field, and press a keyboard shortcut. I used Apple+Shift+V. Click Add.

    Now, whenever you task switch to Mail, the message viewer won't show up because it was minimized instead of hidden. Simply press your keyboard shortcut to bring it back up quickly.

    Hope this helps!
     
  6. macrumors newbie

    Joined:
    Aug 5, 2011
    Location:
    Perth West Australia
    #6
    thank you!

    wow, exactly what i was looking for!

    thanks very much :)
     

Share This Page