Can someone please tell me why this won’t work?
NSAppleScript* playPause = [[NSAppleScript alloc] initWithSource:
@"\
tell application \"System Events\"\n\
tell application \"Final Cut Pro\" to activate\n\
keystroke \" \"\
end tell"];
I get the error “Expected ‘:’ ‘,’ ‘;’ ‘}’ or ‘attribute‘ before ‘=’ token”. WTF?
Thanks for your help!
Putting a backslash before the newline inside a string literal does not work in C, Objective-C, or C++.
Just use
using automatic concatenation of string literals.