tell application "Finder" set currentFolder to (folder of the front window) as alias end tell set posixPath to POSIX path of currentFolder tell application "Terminal" activate do script "cd " & quoted form of posixPath & "; python3 -m http.server" end tell delay 1 set serverURL to "http://127.0.0.1:8000" open location serverURL