• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: calling a shell script from an objective C application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: calling a shell script from an objective C application
  • Next by Date: Re: My newbie question..
  • Previous by thread: Re: calling a shell script from an objective C application
  • Next by thread: Re: cocoa-dev digest, Vol 2 #816 - 15 msgs
  • Index(es):
    • Date
    • Thread