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 11:45:27 -0400
This:
set MB to (do shell script "defaults read com.apple.LaunchServices | grep -C2 public.html")
produces this: (on my machine)
" {LSHandlerRoleAll = \"com.qualcomm.eudora\"; LSHandlerURLScheme = mailto; },
{
LSHandlerContentType = \"public.html\";
LSHandlerRoleAll = \"org.mozilla.camino\";
}, "
Perhaps you can suck it out of there.
Adam
On 2/6/06, Gnarlodious <email@hidden> wrote:
That does not work here, because the targeted line looks like:
{LSHandlerRoleAll = "com.microsoft.entourage"; LSHandlerURLScheme = mailto; },
I have 10.4.4, don't know why it's different from yours. If you post the target line from your machine I'll work out a regex that will recognize "mailto" without being overly greedy.
-- Gnarlie
Entity Adam Bell spoke thus:
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