Skip to content

Instantly share code, notes, and snippets.

@bumaociyuan
Created October 17, 2014 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumaociyuan/1cbe45a3fcf392e1e054 to your computer and use it in GitHub Desktop.
Save bumaociyuan/1cbe45a3fcf392e1e054 to your computer and use it in GitHub Desktop.
apple script get the front window path
tell application "Finder"
set myWin to window 1
set theWin to (quoted form of POSIX path of (target of myWin as alias))
tell application "Terminal"
activate
tell window 1
do script "cd " & theWin
-- do script "cd " & theWin & ";ls -al | more"
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment