- (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