0

I'd like to execute a simple AppleScript command as part of a Sublime Text build system. I created a sublime-build file where the command is

"cmd": ["osascript", "-e", """tell application "Preview" to activate"""]

but I can't seem to escape the quotes properly. I've tried using \", \', and a few other combinations, with no luck. Does anyone know what the proper syntax is? In the shell, I simply write

osascript -e 'tell application "Preview" to activate'

Thanks!

1

Apologies, I got it. The solution is simple and I must have missed it:

"cmd": ["osascript", "-e", "tell application \"Preview\" to activate"]
| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .