Skip to content

Instantly share code, notes, and snippets.

@abbood
Created August 11, 2017 13:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abbood/cacd1fd8b485a8abc8c7d5d73f46e993 to your computer and use it in GitHub Desktop.
Save abbood/cacd1fd8b485a8abc8c7d5d73f46e993 to your computer and use it in GitHub Desktop.
example of automating scripts on multiple tabs on iterm
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