Re: Return PDF default reader
Re: Return PDF default reader
- Subject: Re: Return PDF default reader
- From: John Baltutis <email@hidden>
- Date: Mon, 15 Jan 2007 16:33:14 -0800
On 01/15/07, Jay Louvion <email@hidden> wrote:
>
> I am looking for a way to return the name of the default app that opens
> PDF¼s (Preview, Acrobat, whatever).
>
> Ronald Hofman kindly suggested the following:
> set DefaultApp to (word -6 of (do shell script "defaults read
> com.apple.Preview"))
>
> Unfortunately, OMM it errors out with the following message: sh: line 2:
> com.apple.Preview: command not found¾
>
> Any ideas ?
Doesn't error out here, returning "thumbnailDisplay". OS X 10.4.8.
However, I don't think that's what you want, since that information's kept in
the LaunchServices database. This should get you the default application of any
file on your machine:
set DefaultApp to default application of (info for file (path to file))
Note that this assumes that you've set the default application for all files of
that type via the Get Info window.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden