Re: Determining the Default Mail App
Re: Determining the Default Mail App
- Subject: Re: Determining the Default Mail App
- From: Adam Bell <email@hidden>
- Date: Mon, 6 Feb 2006 15:20:57 -0400
That is strange, because if I change my default browser to Safari, the short form still works for me:
set DI to {"mailto", "http"}
set _defaults to {}
repeat with aI in DI
set end of _defaults to (do shell script "defaults read
com.apple.LaunchServices | sed -n '/" & aI & ";/{s/.*\\.\\(.*\\)\".*/\\1/p;}' ")
end repeat
_defaults --> {"eudora", "safari"}
On 2/6/06, kai <email@hidden> wrote:
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 (
This email sent to email@hidden
--
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