• 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: "Executing" a File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Executing" a File


  • Subject: Re: "Executing" a File
  • From: Guy English <email@hidden>
  • Date: Thu, 4 Oct 2007 22:53:32 -0400

[[NSWorkspace sharedWorkspace] openFile: pathToFile];

On 4-Oct-07, at 10:48 PM, Chris Williams wrote:

I want to be able to programmatically open or "execute" a random file. For
example, if I open a .jpg, it would open in Preview. If I open a .doc, it
would open in Word. And so on. Basically, just execute the default "open
action" for the file.


(Forgive me for this, but) in Windows code, I can just tell .NET to "open" a
file, and it will do the default action. NSTask seems to need an
executable. How do I find that executable?


Thanks.
_______________________________________________

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

_______________________________________________

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


  • Follow-Ups:
    • Re: "Executing" a File
      • From: Chris Williams <email@hidden>
References: 
 >"Executing" a File (From: Chris Williams <email@hidden>)

  • Prev by Date: "Executing" a File
  • Next by Date: Re: "Executing" a File
  • Previous by thread: "Executing" a File
  • Next by thread: Re: "Executing" a File
  • Index(es):
    • Date
    • Thread