Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run {input, parameters}
- tell application "Finder" to set currentFolder to (folder of the front window as alias)
- set cf2 to POSIX path of currentFolder
- set cf3 to quoted form of cf2
- set cmd to "cd " & cf3
- tell application "iTerm"
- activate
- delay 0.3
- tell application "System Events" to keystroke "b" using control down
- tell application "System Events" to keystroke "c"
- delay 0.5
- tell the current window
- tell the current session
- write text cmd
- end tell
- end tell
- end tell
- end run
Advertisement
Add Comment
Please, Sign In to add comment