Created
June 10, 2015 18:07
-
-
Save bfcoder/fd3d51fedfe4697a3699 to your computer and use it in GitHub Desktop.
Apple Script Project Launcher
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
(choose from list {"Large", "Laptop"} with prompt "Which Screen Size?") | |
set screen_size to result as text | |
set window_group to "Common" | |
if (screen_size = "Large") then | |
set window_group to "Freightlink_large" | |
end if | |
if (screen_size = "Laptop") then | |
set window_group to "Freightlink_laptop" | |
end if | |
set cd2project to "cd ~/Documents/projects/canvas_starter_app/" | |
set cd2projectClient to "cd ~/Documents/projects/canvas_starter_app/client" | |
tell application "Terminal" to activate | |
delay 0.5 | |
tell application "Terminal" to activate | |
tell application "System Events" | |
tell process "Terminal" | |
tell menu item "Close All" of menu "Shell" of menu bar item "Shell" of menu bar 1 | |
click | |
end tell | |
end tell | |
end tell | |
tell application "System Events" | |
tell process "Terminal" | |
tell menu item window_group of menu "Open Window Group" of menu item "Open Window Group" of menu "Window" of menu bar item "Window" of menu bar 1 | |
click | |
end tell | |
end tell | |
end tell | |
tell application "Terminal" | |
do script cd2project in window 4 | |
do script "subl ." in window 4 | |
delay 1 | |
do script "foreman start -f Procfile.rails" in window 4 | |
delay 1 | |
do script cd2projectClient in window 3 | |
do script "nodemon webpack.hot.js" in window 3 | |
do script cd2projectClient in window 2 | |
delay 1 | |
do script "node_modules/karma/bin/karma start" in window 2 | |
do script cd2project in window 1 | |
do script "foreman start -f Procfile.ngrok" in window 1 | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment