Re: Determining the Default Mail App
Re: Determining the Default Mail App
- Subject: Re: Determining the Default Mail App
- From: John Baltutis <email@hidden>
- Date: Tue, 7 Feb 2006 16:27:30 -0800
On 02/07/06, "J. Stewart" <email@hidden> wrote:
>
> Yet another method of determining the default browser. This is for theless
>regex inclined :)
>
> --> cut <--
> set defaultBrowser to word -1 of (do shell script "defaults read
>com.apple.LaunchServices | grep -C5 E:html | grep -w LSBundleSignature")
> tell application "Finder" to name of application file id defaultBrowser
> --> cut <--
>
> The previously posted regex methods failed to return anything (just an emopty
>string) on mine or Kai's machines. This method returns "Safari.app"OMM.
As mentioned before, since I've never set another browser than Safari as
default, this snippet returns:
set defaultBrowser to word -1 of (do shell script "defaults read
com.apple.LaunchServices | grep -C5 E:html |grep -w LSBundleSignature")
tell application "Finder"to name of application file id defaultBrowser
->"The command exited with a non-zero status."
indicating that there's no html object within the LaunchServices plist file.
For this case, if the regex methods return "", then you could test for that and
assume that the default's Safari. Likewise, if a check for mailto returns "",
assume Mail is the default mailer.
_______________________________________________
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