Last active
August 29, 2015 14:16
-
-
Save robsonke/e0dda2b313d013563290 to your computer and use it in GitHub Desktop.
This file contains 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
on alfred_script(q) | |
tell application "iTerm" | |
activate | |
tell the first terminal | |
launch session "Default" | |
tell the last session | |
-- give the iterm tab the name of the process | |
set name to q | |
-- take the tomcat based on keyword parameter | |
-- useful in case you want to use multiple tomcats | |
if ((q as string) is equal to "something") | |
write text "cd ~/tomcat/bin" | |
end if | |
write text "./startup.sh" | |
end tell | |
end tell | |
end tell | |
tell application "System Events" | |
set visible of process "iTerm" to true | |
end tell | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How:
Usage:
Alfred: yourkeyword something