IsraelTorres

TermHere.scpt

Aug 17th, 2011
204
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on run
  2.     tell application "Finder"
  3.         try
  4.             activate
  5.             set frontWin to folder of front window as string
  6.             set frontWinPath to (get POSIX path of frontWin)
  7.             tell application "Terminal"
  8.                 activate
  9.                 close
  10.                 do script with command "cd \"" & frontWinPath & "\""
  11.             end tell
  12.         on error error_message
  13.             beep
  14.             display dialog error_message buttons ¬
  15.                 {"OK"} default button 1
  16.         end try
  17.     end tell
  18. end run
RAW Paste Data