Applescript";预期为行尾,但找到标识符“;用于终端应用程序

Applescript";预期为行尾,但找到标识符“;用于终端应用程序,applescript,Applescript,请在此处为applescript填写noob。我想知道如何解决下面显示的applescript的以下问题: 我在线路上发现以下错误,告诉当前终端: 预期行尾,但找到标识符 以下是任何想要尝试它的人的代码: tell application "iTerm" make new terminal tell the current terminal activate current session launch session "Default Ses

请在此处为
applescript
填写noob。我想知道如何解决下面显示的
applescript
的以下问题:

我在线路
上发现以下错误,告诉当前终端

预期行尾,但找到标识符

以下是任何想要尝试它的人的代码:

tell application "iTerm"
    make new terminal
    tell the current terminal
        activate current session
        launch session "Default Session"
        tell the last session
            write text "unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH"
            write text "mkdir -p ~/.boot2docker"
            write text "if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi"
            write text "/usr/local/bin/boot2docker init && /usr/local/bin/boot2docker up && $(boot2docker shellinit) && docker version"
        end tell
    end tell
end tell

参考:

因为
终端
术语是一种古老的AppleScript语法

请参阅,了解新的Applescript语法

tell application "iTerm"
    activate
    set newWindow to (create window with default profile)
    tell newWindow
        tell current session
            write text "unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH"
            write text "mkdir -p ~/.boot2docker"
            write text "if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi"
            write text "/usr/local/bin/boot2docker init && /usr/local/bin/boot2docker up && $(boot2docker shellinit) && docker version"
        end tell
    end tell
end tell