Tweakin’ Mail.app

I’ve blogged before about my e-mail client woes. I finally got fed up enough with Thunderbird’s bugginess and non-integration with just about everything else that I decided to give Mail.app a serious try. So far, so good. There are a few things I miss, though.

One of the main things I missed was the ability to hit a keyboard shortcut to hide and show the preview pane (where the body of an e-mail appears). In Thunderbird, this was done by hitting F8. In Mail.app there is no such beast.

However, Mail.app, being an Apple application, is extremely AppleScript-able. I looked at the Library for Mail.app and found that I could access the visibility of the preview pane. Fabulous. I wrote the following little script and saved it in my ~/Library/Scripts directory:

tell application Mail
    set currentStatus to preview pane is visible of message viewer 1

    if currentStatus = true then
        set preview pane is visible of message viewer 1 to false
    else
        set preview pane is visible of message viewer 1 to true
    end if
end tell

Now, to add the shortcut key. That’s where Quicksilver comes in. I set up a trigger that will run my AppleScript when I hit F8. Ta-da! Color me happy.

5 Responses to “Tweakin’ Mail.app”

  1. David Chartier Says:

    You could also have simply used the Shortcuts List in Keyboard and Mouse System Preferences Pane to assign a keyboard shortcut to the menu item in Mail. That way you don’t have to worry about this shortcut disappearing when Quicksilver crashes, and it can be a bit snappier at times than waiting for the AppleScript engine to kick in.

  2. dmkash Says:

    I was going to do that, but I couldn’t find a menu item that had anything to do with the preview pane. Did I miss it? Where is it?

    BTW: Quicksilver rarely crashes for me. I know others have had issues, but I haven’t. And the response has been very snappy. No waiting . . . just as if I was using a menu item.

  3. Peter Murray Says:

    Top-notch hint; I found a link to it in Hawk Wings. It works just like you describe.

    @David Chartier: I couldn’t make the Shortcut List in the Keyboard and Mouse System Preference Pane work. I suspect it might have something to do with the fact that Mail.app programatically changes “Show” to “Hide” and vice versa, rather than being a static label on that menu item.

  4. Josh Walsh Says:

    @dmkash - Quicksilver ran great for me on Tiger. It’s still crashing once a week or so for me on Leopard. Particularly at boot time.

    Wait… who reboots their mac? Maybe I’m crazy.

  5. 48-Hour Days » Blog Archive » The Apps I Use Says:

    [...] cross-platform nature means that it just doesn’t work seamlessly with just about anything. With a few tweaks, Mail.app has turned out to be quite [...]

Say Something!