首页 > 解决方案 > 使用 AppleScript 运行脚本后如何关闭终端?

问题描述

我有一个打开终端并运行脚本的子程序。

看起来像这样

on run_python()
    tell application "Terminal"
        set currentTab to do script ("cd Desktop/")
        do script ("python3 demo.py") in currentTab
    end tell
end run_python

我想知道如何在运行脚本后关闭该终端选项卡。你能帮助我吗?

标签: applescript

解决方案


推荐阅读