Re: Name to PSN
Re: Name to PSN
- Subject: Re: Name to PSN
- From: Ken Thomases <email@hidden>
- Date: Sat, 21 Feb 2009 11:06:03 -0600
On Feb 21, 2009, at 10:57 AM, Pierce Freeman wrote:
I am having a little trouble finding a way to go from the name of a
process
to its PSN. Maybe it's just something I have overlooked, but all the
documentation seems to be going from the PSN to its name. My goal
is to use
the name of a particular process and "kill it" using Apple Events.
You can scan the array of dictionaries returned by -[NSWorkspace
launchedApplications] for the one which matches your criteria, and get
the PSN from that.
In general, I recommend that you use the bundle identifier, rather
than the name, to discriminate among applications/processes.
Cheers,
Ken
_______________________________________________
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
References: | |
| >Name to PSN (From: Pierce Freeman <email@hidden>) |