• 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: how do I get the names of other runnings apps and start/stop one?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I get the names of other runnings apps and start/stop one?


  • Subject: Re: how do I get the names of other runnings apps and start/stop one?
  • From: Michael Mulligan <email@hidden>
  • Date: Wed, 16 Oct 2002 08:08:58 -0400

Not sure if this is right, but you could run an NSTask along the lines of
top|grep "appNameThatMightBeRunning" ? *shrugs* This would give you the
process ID (if it's running) so that then you could just say "kill
thatNumber"


On 10/16/02 2:21 AM, "Donald S. Hall" <email@hidden> wrote:

> I want my Cocoa application to be able to control the running of another
> application (which is a Carbon application). Specifically, I need to be able
> to do the following:
>
> 1. Determine if the other app is currently running.
>
> 2. Launch or kill the other app.
>
> In Applescript, both tasks are trivial. What do I do in my Cocoa app?
>
> I have been looking through the documentation and have found that I can use
> NSWorkspace to launch the application, but I can't figure out how to
> determine if it is already running (in other words get a list of running
> applications and see if it is in the list), or how to stop it via my first
> program.
>
> I want this to be able to work in both 10.1 and 10.2.
>
> Any suggestions or pointers would be greatly appreciated.
>
> Thanks,
>
> Don
> --
> Donald S. Hall, Ph.D.
> Apps & More Software Design, Inc.
> http://www.theboss.net/appsmore
> email@hidden
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.


-m^2

__________
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me
spread!
__________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: how do I get the names of other runnings apps and start/stop one?
      • From: David Remahl <email@hidden>
References: 
 >how do I get the names of other runnings apps and start/stop one? (From: "Donald S. Hall" <email@hidden>)

  • Prev by Date: Re: Drawing an NSImage into a custom NSView
  • Next by Date: Re: cocoa-dev digest, Vol 2 #1392 - 15 msgs
  • Previous by thread: how do I get the names of other runnings apps and start/stop one?
  • Next by thread: Re: how do I get the names of other runnings apps and start/stop one?
  • Index(es):
    • Date
    • Thread