Launch a background task
Launch a background task
- Subject: Launch a background task
- From: Arthur VIGAN <email@hidden>
- Date: Sun, 02 Jun 2002 21:29:37 +0200
Hi,
I'm trying to do a little application which would launch some background
tasks (in fact shell scripts). I would like to know how I can launch them
from my application. I tried to use an NSTask, but the result wasn't very
good. For instance I tried:
- (void)runScript
{
NSTask *scriptTask = [[NSTask alloc] init];
[sciptTask setLaunchPath:@"~/bin/myScript"];
[scriptTask launch];
}
But I got the following error (ScriptMenu is the name of my app):
2002-06-02 21:26:11.491 ScriptMenu[2243] Task create for path
/Users/arthur/bin/myScript failed.
What should I do?
Arthur
_______________________________________________
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.