Re: Finding process path from Cocoa?
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