Hint: Create new mail or mail note with selected text

Discussion in 'OS X' started by Habakuk, Sep 3, 2009.

  1. macrumors 6502a

    Joined:
    Jul 10, 2007
    Location:
    Vienna Austria Europe
    #1
    At "Apple's Snow Leopard Refined..." site, you can find shortly after the middle the paragraph "The right service at the right time" with an illustration: A contextual menu (Service) of a selected text in Safari, "New Note With Selection". This automatic instantly produces a brand new and screaming yellow mail note containing the selected text, neatly filled out with subject (beginning of the text), sender, date and time. You can access services with a right click of your mouse or Control-click of your trackpad.

    Here is a simple step-by-step guide on how to have this very practical contextual menue entry that should work with any program where you can select text:
    1. Open the app "Automator" and choose "Service".
    2. Select in the left column "Library" (should be by default), then "Copy to Clipboard" in the right column and move it into the empty main space.
    3. Then put the list entry "Run AppleScript" below the first item in the space.
    4. In the Script box of an English-language system, enter (please have a look at the attached screenshot):
      Code:
        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 
      		  click the menu item "Paste" of the menu "Edit" of menu bar 1 
      	  end tell 
        end tell 
      In a German-language system, enter:
      Code:
      tell application "Mail"
      	activate
      end tell
      
      tell application "System Events"
      	tell process "Mail"
      		click the menu item "Neue Notiz" of the menu "Ablage" of menu bar 1
      		click the menu item "Einsetzen" of the menu "Bearbeiten" of menu bar 1
      	end tell
      end tell
    5. Automator, File menue: "Save As..." eg "Make New Mail Note" or "New Note With Selection".
    6. You're done. Now this contextual menue is available everywhere!
    You can even make a new mail with selected text: Create another contextual service with Automator, which contents only the entry "New Mail Message" from the library list. Save it as "Make New Mail" eg.

    Those who want an advanced feature, like having such notes right on their iPhone, repeat the last paragraph and type in Automator their own mail address in the "To:" field (may use address book) and save the service as "Mail Selection To Me" eg. Those mail actions just require the subject to be filled out (but that can also be automatically initiated by filling out the subject line in Automator's "New Mail Message" field, but the subject is then always the same) and a click on "Send".

    Unfortunately, this approach has no mini-icon in the contextual menue (as seen at Apple's German-language "Refinements" site, get over), and I have no idea if it worked even under 10.5.x (Leopard).
     

    Attached Files:

  2. macrumors member

    Joined:
    Sep 5, 2008
    #2
    Thanks

    That's an awesome tip, exactly what I was looking for. I'd never used Automator before and even I got it to work. :)
     

Share This Page