I have a subroutine which opens a terminal and runs a script.
It looks like this
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
I'm wondering how to close that terminal tab after running the script. Can you help me?