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 13:59:34 -0400
Nothing more than replacing 'mailto' with 'http' did the trick:
do shell script "defaults read com.apple.LaunchServices | sed -n '/http;/{s/.*\"\\(.*\\)\".*/\\1/p;}' "
--> "org.mozilla.camino
"
so, at least in 10.4.4, this gets both the default browser and the default emailer:
set DI to {"mailto", "http"}
set _defaults to {}
repeat with aI in DI
set D to (do shell script "defaults read
com.apple.LaunchServices | sed -n '/" & aI & ";/{s/.*\"\\(.*\\)\".*/\\1/p;}' ")
set {TID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "."}
set end of _defaults to text item 3 of D
set AppleScript's text item delimiters to TID
end repeat
_defaults --> {"eudora", "camino"}
On 2/6/06,
Gnarlodious <email@hidden> wrote:
Same here, 10.4.4.
10.3 had an entirely different system for keeping track of the default apps,
this method will not work on 10.3.x.
I don't even remember what the 10.3 system is like. I believe the pertinent
file is at
/Library/Preferences/SystemConfiguration/preferences.plist
If you post the part of that file that has the email app I'll try to work it
out.
Adam:
You can get the default browser by replacing ³mailto² with ³http². My output
does not have a 3 line text block. I¹d suggest keeping it simple until the
hotdoggers at Apple get LaunchServices hammered out.
Be sure to post your final result so I can use it too.
-- Gnarlie
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden
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