Re: Getting a list of applications for a file type via LaunchServices
Re: Getting a list of applications for a file type via LaunchServices
- Subject: Re: Getting a list of applications for a file type via LaunchServices
- From: Robert Krüger <email@hidden>
- Date: Tue, 22 Mar 2011 17:13:02 +0100
On Mar 22, 2011, at 4:53 PM, Luther Fuller wrote:
> On Mar 22, 2011, at 9:10 AM, Robert Krüger wrote:
>
>> I'm trying to get a list of applications registered for a file type via LaunchServices, i.e. the ones Finder shows you in the "Open with ..." menu. I tried searching the archives and the web and was puzzled that I didn't find anything for this seemingly simple task. Is this functionality not exposed via Applescript?
>
> Interesting question. I've just tried finding info for LaunchServices and all I could find was some misleading info on the 'lsregister' command. Finally discovered that it's well hidden and has changed location over the years. Finally got this to work ...
>
> set lsregisterAlias to alias (POSIX file "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister")
> quoted form of (POSIX path of lsregisterAlias)
> do shell script the result & " -dump"
> log the result
>
> A large result. You may want to direct the result to a file.
I think what I am looking for is the AppleScript equivalent of this API call:
http://developer.apple.com/library/mac/#DOCUMENTATION/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSCopyApplicationURLsForURL
Maybe I should be looking into AppleScriptObjC.
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden