Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Can anyone figure out a way to switch Apple Mail (v5.2) to/from "Classic Layout" mode with a hotkey? Maybe via Applescript?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here's the applescript for it. Set this up as an app or something but this should get you started.

tell application "Mail" to activate
tell application "System Events"
    keystroke "," using command down
end tell

tell application "System Events"
    tell process "Mail"
        click button 5 of tool bar 1 of window 1
        delay 0.1
        click checkbox "Use classic layout" of group 1 of group 1 of window "Viewing"
    end tell
end tell
share|improve this answer
    
That gives me an error, System Events got an error: Can’t get window "Viewing" of process "Mail". -- unless I had already previously selected the 'Viewing' pane of the Prefs window. –  Ze'ev Feb 3 '13 at 20:44
    
Sorry about that! Forgot to click that toolbar first. Edited my answer to include that. –  Kevin Z Feb 5 '13 at 6:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.