Script utilisant le finder pour obtenir le chemin d’accès POSIX du dossier actuellement ouvert dans la fenêtre active. Il utilise ensuite l’application Terminal pour ouvrir une nouvelle fenêtre de terminal et exécuter la commande cd pour se déplacer vers ce chemin d’accès.
tell application "Finder"
set currentPath to quoted form of (POSIX path of (target of front window as alias))
end tell
tell application "Terminal"
do script "cd " & currentPath
activate
end tell