• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining the Default Mail App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining the Default Mail App


  • Subject: Re: Determining the Default Mail App
  • From: Gnarlodious <email@hidden>
  • Date: Mon, 06 Feb 2006 08:18:31 -0700
  • Thread-topic: Determining the Default Mail App

Title: Re: Determining the Default Mail App
That does not work here, because the targeted line looks like:

       {LSHandlerRoleAll = "com.microsoft.entourage"; LSHandlerURLScheme = mailto; },

I have 10.4.4, don’t know why it’s different from yours. If you post the target line from your machine I’ll work out a regex that will recognize “mailto” without being overly greedy.

-- Gnarlie



Entity Adam Bell spoke thus:

This works in Tiger:

to GetDefaultMailAppInfo()
    set creatorType to word -1 of (do shell script ¬
        "defaults read com.apple.LaunchServices |grep -C5 U:mailto | grep -w LSBundleSignature")
    set {text:creatorType} to (text of creatorType) as text
    tell application "Finder"
        set {defEmailName, emailContainerAlias} to ¬
            {name, container} of application file id creatorType
    end tell
    return {((emailContainerAlias as Unicode text) & defEmailName), defEmailName}
end GetDefaultMailAppInfo


On 2/5/06, Gnarlodious <email@hidden> wrote:
Entity Todd Geist spoke thus:

> Is there an Applescript way to determine the Default Mail application  
Probably your best bet is to say something like:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister –dump

>From the result of that command you would look for the line containing the string " eml"

Two lines later is the app that is the default email app.

-- Gnarlie
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Determining the Default Mail App
      • From: Adam Bell <email@hidden>
References: 
 >Re: Determining the Default Mail App (From: Adam Bell <email@hidden>)

  • Prev by Date: Re: Determining the Default Mail App
  • Next by Date: Re: Determining the Default Mail App
  • Previous by thread: Re: Determining the Default Mail App
  • Next by thread: Re: Determining the Default Mail App
  • Index(es):
    • Date
    • Thread