Created
November 28, 2013 22:46
-
-
Save nanoant/7699098 to your computer and use it in GitHub Desktop.
Open in Terminal for Forklift by me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- OpenInTerminal.applescript | |
-- ForkLift | |
-- Created by ONO | |
tell application "Terminal" | |
activate | |
set windowCount to (count of the windows) | |
-- Terminal may be just launched loading the shell, wait a bit | |
if windowCount is greater than 0 and first window is busy then | |
delay 0.5 | |
end if | |
-- Still busy / no windows? open new tab | |
if windowCount is greater than 0 and first window is busy or windowCount is 0 then | |
tell application "System Events" to tell process "Terminal" | |
click first menu item of first menu of second menu item of first menu of third menu bar item of first menu bar | |
end tell | |
end if | |
do script "cd _forklift_path_placeholder_" in first window | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment