applescript "Expected end of line but found identifier"

AppleScript: "Expected end of line but found identifier"

https://www.iterm2.com/documentation-scripting.html

 

MacのScript Editorでのエラー:

tell application "iTerm 2"

create window with default profile command "echo "Hello World""

end tell

 

解決:コマンドにエラーがあった場合に出るエラーのよう。

コード:

tell application "iTerm 2"

create window with default profile command "echo Hello World"

end tell