• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to set the name of open-with application for a specific file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the name of open-with application for a specific file?


  • Subject: Re: How to set the name of open-with application for a specific file?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 2 Aug 2009 21:47:34 -0700

On Aug 2, 2009, at 20:09, Harry Jordan wrote:

The place to look is the Launch Services Reference, in particular the
LSSetDefaultRoleHandlerForContentType() function.
I haven't used the setter functions myself, but it looks reasonable.
Hope that helps.

My interpretation was the the OP wants to set it for a single (document) file, not change the application for all files of the type, and I don't see a Launch Services function for *that*.


Presumably the Finder does this by storing something in the file's metadata, that doesn't involve Launch Services at all (or perhaps only via private API). If that's so, there might be a way to do it via AppleScript, but I'll leave it to those who know something about that to comment.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: How to set the name of open-with application for a specific file? (From: Harry Jordan <email@hidden>)

  • Prev by Date: Re: Bindings/KV Too Magical
  • Next by Date: Table view data source methods order?
  • Previous by thread: Re: How to set the name of open-with application for a specific file?
  • Next by thread: Table view data source methods order?
  • Index(es):
    • Date
    • Thread