Using the NSTask method enables one to create a GUI wrapper around a commandline program. For instance, this code snippet derived from CocoaDev shows how to launch the ls utility:
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/bin/ls"];
NSArray *arguments;
arguments = [NSArray arrayWithObjects: @"-l", @"-a", @"-t",nil];
[task setArguments: arguments];
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.