Re: calling a shell script from an objective C application
Re: calling a shell script from an objective C application
- Subject: Re: calling a shell script from an objective C application
- From: Graeme Nattress <email@hidden>
- Date: Fri, 21 Jun 2002 11:23:16 -0400
*This message was transferred with a trial version of CommuniGate(tm) Pro*
I'm working on a Cocoa GUI to a TCL shell script, and this is the bit
that launches the script when the button is pressed:
- (IBAction)myAction:(id)sender
{
NSTask *ribhacker;
ribhacker = [[NSTask alloc] init];
[ribhacker setLaunchPath:@"/usr/bin/ribhack.tcl"];
[ribhacker setArguments:[NSArray arrayWithObject:@"help"]];
[myOutlet setTitle:@"Runing..."];
[ribhacker launch];
[myOutlet setTitle:@"Go"];
[ribhacker release];
}
I found out how to do this from
http://www.cocoadevcentral.com/tutorials/showpage.php?show=00000017.php
Hope this helps,
Graeme
Hi all,
Is it possible to execute a (unix) script in an Objective C application?
I tried with launchApplication but nothing seems to happen.
Thanks
Jo Dotremont
--
--
Graeme Nattress: Vice President R&D www.noitaminanimation.com
_______________________________________________
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.