Run A Multiline AppleScript On The Command Line
AppleScipts are generally at least three lines. For example:
Code
tell application "Sublime Text"
activate
end tell
The line ending acts as he seperator. You can't use `;` like with javascript to make a single line command. Instead, you can pass each line with it's own `-e` flag.
For example:
Code
osascript -e 'tell application "Sublime Text"' -e 'activate' -e 'end tell'
Another option (and the one I generally go with) is to use javascript instead of applescript.
Code
osascript -l JavaScript -e "Application('Sublime Text').activate()"