• 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: Bringing an NSTask forward
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bringing an NSTask forward


  • Subject: Re: Bringing an NSTask forward
  • From: Nicholas Riley <email@hidden>
  • Date: Thu, 3 Apr 2003 14:32:35 -0600
  • Mail-followup-to: "ROSE,ROBERT W (HP-Corvallis,ex1)" <email@hidden>, "'email@hidden'" <email@hidden>

On Thu, Apr 03, 2003 at 11:37:05AM -0800, ROSE,ROBERT W (HP-Corvallis,ex1) wrote:
> Hi all, I'm not sure if I'm using this class the way it was intended, but
> I'm using NSTask in my "background" (command line) application to launch a
> foreground (gui) application. The problem is, after I launch the NSTask gui
> program it doesn't come to the foreground. I would like to be able to bring
> the program to the foreground after I launch it.
>
> Is there a way to bring an NSTask forward, or do I have to use the good'old
> Process Manager?

Process Manager is the way to go :-)

I've written a command-line interface to the Process Manager called
'appswitch' - it does a lot of stuff with switching, hiding, showing,
quitting, killing processes. I've found it really useful (but then,
I'm a bit biased).

usage: appswitch [-sShHkFlP] [-c creator] [-i bundleID] [-a name] [-p pid] [path]
-s show application, bring windows to front (do not switch)
-S show all applications
-h hide application
-H hide other applications
-q quit application
-k kill application (SIGINT)
-K kill application hard (SIGKILL)
-l list applications
-L list applications including full paths and bundle identifiers
-P print application process ID
-F bring current application's windows to front
-c creator match application by four-character creator code ('ToyS')
-i bundle ID match application by bundle identifier (com.apple.scripteditor)
-p pid match application by process identifier [slower]
-a name match application by name
appswitch 1.0 (c) 2003 Nicholas Riley <http://web.sabi.net/nriley/software/>.
Please send bugs, suggestions, etc. to <email@hidden>.

It is open source with a BSD-ish license so it should be no problem to
use in commercial software if you want.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.

References: 
 >Bringing an NSTask forward (From: "ROSE,ROBERT W (HP-Corvallis,ex1)" <email@hidden>)

  • Prev by Date: state of java bridge
  • Next by Date: Re: hasSuffix and new line characters.
  • Previous by thread: Re: Bringing an NSTask forward
  • Next by thread: import statement issues
  • Index(es):
    • Date
    • Thread