Skip to content

Instantly share code, notes, and snippets.

@hferentschik
Created November 26, 2010 13:45
Show Gist options
  • Save hferentschik/716725 to your computer and use it in GitHub Desktop.
Save hferentschik/716725 to your computer and use it in GitHub Desktop.
open terminal apple script
on run
tell application "Finder"
try
activate
set frontWin to folder of front window as string
set frontWinPath to (get POSIX path of frontWin)
tell application "Terminal"
activate
do script with command "cd \"" & frontWinPath & "\""
end tell
on error error_message
beep
display dialog error_message buttons ¬
{"OK"} default button 1
end try
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment