Re: Is this program open?
Re: Is this program open?
- Subject: Re: Is this program open?
- From: "Tom Harrington" <email@hidden>
- Date: Thu, 13 Apr 2006 13:34:42 -0600
On 4/13/06, John Stiles <email@hidden> wrote:
> On Apr 13, 2006, at 10:41 AM, Tom Harrington wrote:
> > I think you want to look at [[NSWorkspace sharedWorkspace]
> > launchedApplications]. Then scan the resulting dictionaries for your
> > path-- in the NSApplicationPath key.
> >
> > I'm sure it's possible in Carbon, but that's the obvious Cocoa
> > starting point.
>
> I experimented with -launchedApplications in the past, but it had a
> lot of limitations—it only displayed apps that are end-user visible.
> Things like faceless apps and command line tools weren't included.
> What does Activity Monitor use? It can even see other users' apps.
> That would be ideal for me.
Ah, well, it'd be nice if you had mentioned that you'd tried this, and
that you needed command-line tools to be included. The lack of these
details (plus the mention of a .app bundle path) in your question made
it seem as though -launchedApplications would be appropriate.
When I had to do something similar, I used sysctl(3). Apple gives a
nice example of how to do this at
http://developer.apple.com/qa/qa2001/qa1123.html
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
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