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.

Is there a way (or an add-on) that lets me customize the Mail.app toolbar beyond "View -> Customize Toolbar"? At a minimum, I want to add buttons that do "Move to <somefolder>".

share|improve this question
1  
I don't have an answer for you, but welcome, Paul! –  Negrino Mar 18 '11 at 3:08
    
I do not have an answer for this either. But I guess you can create tiny applescripts, and bind them to keyboard shortcuts. –  nuc Mar 25 '11 at 15:34
    
Not really an answer to your question but maybe a workaround. You could use automator to add actions to the services menu –  elhombre Apr 2 '11 at 15:38
1  
To be clear, I really really want something that creates buttons on the toolbar: I don't want to memorize any more keystrokes. –  Paul Hoffman Apr 6 '11 at 12:06

3 Answers 3

up vote 2 down vote accepted

Read CocoaDev: HowToAddButtonsToAppleMail. It references a page of links to articles/examples on writing Mail.app plugins. You will also need to do some programming of Mail.app, e.g. using AppleScript - which you can learn more about here.

Here is a year-and-a-half old blog post by a guy who managed to get some useful control over Mail.app from AppleScript. You might use it as a model. He built his with a third-party module but you might find a way to write your own, if necessary.

The scripting of Mail.app might be stable. However, from what I have read - the rules for how to construct a Mail.app plugin may be in flux from one major version of Mac OS X to the next.

That could be enough to discourage you from writing what you want for wide distribution but it might not be much of a handicap for personal use.

share|improve this answer
    
That does discourage me, yes. :-) However, it is the best we have seen, and it is probably the definitive answer, unfortunately. –  Paul Hoffman Apr 21 '11 at 12:55

I think you can use Mail Act-on for this, it provides Shortcuts for doing stuff with various mails. Not a Visual Shortcut, but a Keyboard one.

Move messages by keystroke only Mail Act-On’s interface includes the ability to move or copy messages to any folders by keystroke, even if you don’t have an Act-On rule for a particular mailbox.

http://www.indev.ca/MailActOn.html

Hope it helps,

Karl

share|improve this answer
1  
+1. I love mail act-on. –  Harv Apr 5 '11 at 21:44
    
Thanks, but I really want something visual. I have way too many keyboard shortcuts to remember as it is. FWIW, I use MsgFiler now, and it seems less intrusive than Act-On. –  Paul Hoffman Apr 6 '11 at 12:05
  1. Open Automator
  2. File -> New -> Service -> Choose
  3. Service receive no input in Mail.app
  4. From library select Utilities -> Run AppleScript
  5. Insert the code provided below and save under name Move to trash [Gmail] enter image description here
  6. Edit the script and change your account name. Name of the account could be found at Mail -> Preferences... -> Accounts
  7. Open Mail.app and select Mail -> Services -> Service Preferences...
  8. Assign a shortcut to the service Move to trash [Gmail]
  9. Restart Mail.app
  10. (Optional) You should be able to see the assigned shortcut in the menu enter image description here
  11. Open inbox, select messages to be moved to trash and press the keyboard shortcut*. Messages will be moved to [Gmail]/Trash

*Note: For the first time the script works quite long, but all the following times it should proceed much faster.

AppleScript:

on run {input, parameters}
    tell application "Mail"
        set s to selection
        repeat with i from 1 to the count of s
            set msg to item i of s
            set box to mailbox of msg
            if name of box is not "[Gmail]/Trash" then
                move msg to mailbox "[Gmail]/Trash" of account "<Your account name here>"
            end if
        end repeat
    end tell
end run

This approach does not allow to add a button to the toolbar, but it's very close to what you are looking for.

Useful links:

share|improve this answer

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.