Created
August 11, 2017 13:49
-
-
Save abbood/cacd1fd8b485a8abc8c7d5d73f46e993 to your computer and use it in GitHub Desktop.
example of automating scripts on multiple tabs on iterm
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
tell application "iTerm" | |
tell current window | |
-- create a tab for background db stuff | |
create tab with default profile | |
tell current session | |
write text "mongod &" | |
write text "redis-server &" | |
end tell | |
close current tab | |
-- create tab to run aioc server | |
create tab with default profile | |
tell current session | |
write text "title server" | |
write text "aactivate" | |
write text "arunserver" | |
-- split tab vertically to run scheduler | |
split vertically with default profile | |
end tell | |
-- run scheduler | |
tell last session of last tab | |
write text "title scheduler" | |
write text "aactivate" | |
write text "ascheduler" | |
-- split tab vertically to run main controller | |
split vertically with default profile | |
end tell | |
-- run main_controller | |
tell last session of last tab | |
write text "title main_controller" | |
write text "aactivate" | |
write text "amain_controller" | |
-- split tab vertically to run aggregator | |
split vertically with default profile | |
end tell | |
tell last session of last tab | |
write text "title aggregator" | |
write text "aactivate" | |
write text "aggregator" | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment