Run A Multiline AppleScript On The Command Line
AppleScipts are generally at least three lines. For example:
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:
Another option (and the one I generally go with) is to use javascript instead of applescript.
-- end of line --