• 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: Finding process path from Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding process path from Cocoa?


  • Subject: Re: Finding process path from Cocoa?
  • From: Laurent Daudelin <email@hidden>
  • Date: Wed, 9 Dec 2009 10:33:37 -0800

On Dec 8, 2009, at 16:14, Nick Zitzmann wrote:

>
> On Dec 8, 2009, at 5:03 PM, Laurent Daudelin wrote:
>
>> Is there any way I can find what's the path of a given process running? A background process, which cannot be retrieved in [[NSWorkspace sharedWorkspace] launchedApplications]?
>
> Yes. ([[[NSProcessInfo processInfo] arguments] objectAtIndex:0])


That's good if you want to know about your own process but what I was looking for was to check another process. Since I had to support 10.5, NSRunningApplication was out of question. So, I ended up using some AppleScript built programmatically: "tell application \"System Events\" to get (file of every process whose name is \"<name of process here\") as text". I was able to use the result. Kinda odd to use AppleScript for that but that was the quickest way I found.

Thanks for all other messages and considerations.

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://nemesys.dyndns.org
Logiciels Nemesys Software              				email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries


_______________________________________________

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: Finding process path from Cocoa?
      • From: Dave DeLong <email@hidden>
    • Re: Finding process path from Cocoa?
      • From: "Sean McBride" <email@hidden>
References: 
 >Finding process path from Cocoa? (From: Laurent Daudelin <email@hidden>)
 >Re: Finding process path from Cocoa? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Finding process path from Cocoa?
  • Next by Date: Re: Finding process path from Cocoa?
  • Previous by thread: Re: Finding process path from Cocoa?
  • Next by thread: Re: Finding process path from Cocoa?
  • Index(es):
    • Date
    • Thread