Here is the code:
- (IBAction) charlieImputText:(id)sender {
[progressBarText startAnimation:self];
charlieImputSelf = [sender stringValue];
NSAppleScript *sendCharlieImput = [[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell application \"Terminal\" to do shell script \"%@\"", charlieImputSelf]];
[sendCharlieImput executeAndReturnError:nil];
NSDictionary* errorDict;
NSAppleScript* script=[[NSAppleScript alloc]
initWithContentsOfURL:[NSURL fileURLWithPath:@"/applications/jarvis/scripts/getTextCharlieResponce.scpt" ]
error:&errorDict];
NSAppleEventDescriptor* desc=[script executeAndReturnError:&errorDict];
NSString* result=[desc stringValue];
self.charlieOutput.stringValue = result;
charlieOutput.textColor = [NSColor greenColor];
[script release];
[progressBarText stopAnimation:self];
}
Ok, this still doesn't work the way I want it to. It doesn't send what's in the text field to the terminal.
Any ideas??
Elijah