• 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: kai <email@hidden>
  • Date: Mon, 6 Feb 2006 19:10:49 +0000


On 6 Feb 2006, at 18:54, Adam Bell wrote:

And, substituting "http" for "mailto" produces the default browser too. Excellent.

Not here, I'm afraid (10.4.4):

---------------

do shell script "defaults read com.apple.LaunchServices | sed -n '/ mailto;/{s/.*\\.\\(.*\\)\".*/\\1/p;}' "

--> "mail"

---------------

do shell script "defaults read com.apple.LaunchServices | sed -n '/ http;/{s/.*\\.\\(.*\\)\".*/\\1/p;}' "

--> ""

---------------

This, however, does work:

---------------

set l to {"mailto", "http"}
set p to POSIX path of (path to preferences) & "com.apple.LaunchServices.plist"
repeat with i in l
tell application "System Events" to set v to value of property list item ¬
"LSBundleIdentifier" of property list item 1 of property list item ¬
("U:" & i) of property list item "LSPrefsBindings" of property list file p
tell application "Finder" to set i's contents to (get name of application file id v)'s text 1 thru -5
end repeat
l


--> {"Mail", "Safari"}

---------------

---
kai


_______________________________________________ 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>
    • Re: Determining the Default Mail App
      • From: Adam Bell <email@hidden>
References: 
 >Re: Determining the Default Mail App (From: Adam Bell <email@hidden>)
 >Re: Determining the Default Mail App (From: Gnarlodious <email@hidden>)
 >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