• 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: Setting the "Open with" attribute on a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting the "Open with" attribute on a file


  • Subject: Re: Setting the "Open with" attribute on a file
  • From: Michael Rothwell <email@hidden>
  • Date: Thu, 2 Jun 2005 20:47:32 -0400


I peeked in the resource fork for a file that I set to open with VLC, and the string /Applications/VLC.App appears in there. So, it seems that I need to write a resource to a file's resource fork to set it to open in VLC by default. Anyone know of a utility that will enumerate the contents of a resource fork? Looking at it in a hex editor is useful, but just a little tedious.



On Jun 2, 2005, at 11:09 AM, Sean McBride wrote:

On 2005-06-01 21:21, Michael Rothwell said:


I have a program that creates an MPEG file that I wish to open in VLC
by default, rather than in Quicktime. How might I set the "open with"
attribute for the MPEG file from within my program? I can "Get Info"
on the file and set it there, so there must be some  method for doing
it that I am overlooking.


The rules that govern which app opens a given kind of file are determined
by Launch Services. The rules changes between OS releases. You might
start by looking at:
<http://developer.apple.com/documentation/Carbon/Conceptual/
LaunchServicesConcepts/LSCIntro/chapter_1_section_1.html>


Perhaps setting your file's creator to VLC's creator would do the trick,
assuming VLC specifies a creator, which it might not (as Cocoa app are
want to do, sadly).


--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Setting the "Open with" attribute on a file
      • From: "Sean McBride" <email@hidden>
    • Re: Setting the "Open with" attribute on a file
      • From: Augie Fackler <email@hidden>
References: 
 >Setting the "Open with" attribute on a file (From: Michael Rothwell <email@hidden>)
 >Re: Setting the "Open with" attribute on a file (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Manual KVO and will/didChangeValueForKey
  • Next by Date: MainMenu.nib a good spot for NSMenuItem bindings?
  • Previous by thread: Re: Setting the "Open with" attribute on a file
  • Next by thread: Re: Setting the "Open with" attribute on a file
  • Index(es):
    • Date
    • Thread