- (IBAction) charlieImputText:(id)sender {
NSAppleScript *keystrokeReturn = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to keystroke return"];
[keystrokeReturn executeAndReturnError:nil];
[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];
}
我这样一个新手到这一点,我在另一个问题发布了一个问题,此代码,有人回答我这个:报价参数
你需要引用的说法做的shell脚本。
这是什么意思?有人可以举个例子吗?
我SOOOO对不起,我不知道这是什么新时代的行话指! :d
而不是发布一个新的问题,你应该最好发表评论给谁回答,问他们的意思。的99%的时候,他们会很乐意澄清,只要你努力去澄清什么你不理解等等:) – Kalle 2010-07-03 09:50:52
哦....对不起...我是新来这个地方。如果发布新评论,他们是否会收到电子邮件通知? – objectiveccoder001 2010-07-03 12:29:37