Re: how do I get the names of other runnings apps and start/stop one?
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.