문자열 "theData"를 보내는 함수가 있습니다. 이 코드를 여기에 삽입하고 싶습니다. 누군가 나에게이 구문을 알려주시겠습니까? \ "s와 \"s는 약간 털이 있습니다. 감사!일부 데이터를 AppleScript 문자열에 삽입하는 방법
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/osascript"];
[task setArguments:[NSArray arrayWithObjects:@"-e", @"tell application \"System Events\"\n",
@"-e", @" keystroke \"" + theData + "\"",
@"-e", @"end tell", nil]];
[task launch];
Objective-C로 키 스트로크를 시뮬레이트하는 데 더 좋은 방법이있을 것입니다. – icktoofay
사실, 그럴 것 같습니다. (http://stackoverflow.com/questions/2379867/) – icktoofay
woah. 고마워 친구. –