I have a simple applescript to open a terminal window and run a python script, and I would like it to bring to focus *only* that terminal window when it runs, leaving other terminal windows in the background (as if I had just clicked that single terminal window). This script works, but brings forward *all* my terminal windows. Any suggestions?
Code:
tell application "Terminal"
do script with command "python ~/example.py"
tell window 1 to activate
end tell