• 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: Name to PSN
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name to PSN


  • Subject: Re: Name to PSN
  • From: Pierce Freeman <email@hidden>
  • Date: Sat, 21 Feb 2009 09:38:56 -0800
  • Thread-topic: Name to PSN

Hi Ken:

Thanks for your reply.  I see where you're coming from regarding
NSWorkspace, and it seems like a great idea!  How would you recommend
scanning it?  A loop or something else more creative?  ;)  Is there some
reason it is better/easier to use the bundle identifiers instead of the
name?  And I assume you would get this by sorting through NSWorkspace as
well.


Pierce


On 2/21/09 9:06 AM, "Ken Thomases" <email@hidden> wrote:

> 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

  • Follow-Ups:
    • Re: Name to PSN
      • From: Ken Thomases <email@hidden>
References: 
 >Re: Name to PSN (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Question on threads running in my Foundation tool
  • Next by Date: Re: Name to PSN
  • Previous by thread: Re: Name to PSN
  • Next by thread: Re: Name to PSN
  • Index(es):
    • Date
    • Thread