• 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: David Remahl <email@hidden>
  • Date: Wed, 16 Oct 2002 14:44:25 +0200

> 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"

-[NSWorkspace launchedApplications] gives an array of dictionaries
describing all launched applications. Instead of killing it off, you should
send it a quit appleevent. You can use the new NSAppleScript class in 10.2.
Perhaps you can write your code an compile it in an applescript, and then
run it using NSAppleScript, and get rid of NSWorkspace all together.

/ Sincerely, David Remahl
_______________________________________________
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: Ondra Cada <email@hidden>
References: 
 >Re: how do I get the names of other runnings apps and start/stop one? (From: Michael Mulligan <email@hidden>)

  • Prev by Date: Re: Subclassing NSDocumentController
  • Next by Date: Is this a bug of URLHandle or just a documentation omission?
  • Previous by thread: Re: 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