• 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: Adam Bell <email@hidden>
  • Date: Mon, 6 Feb 2006 10:40:33 -0400

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      (



--
Some minds remain open long enough for a truth to both enter and leave without processing.
 _______________________________________________
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: Gnarlodious <email@hidden>
References: 
 >Re: Determining the Default Mail App (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Records in handlers
  • 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