Re: Bringing an NSTask forward
Re: Bringing an NSTask forward
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.