I have a function that sends a string "theData". I want to insert that string here in this code. Would someone please tell me the correct syntax for this? Things get a bit hairy with the \"s and the "s. Thanks!
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];