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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden