Re: Determining the Default Mail App
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