-- Instrucciones:
-- 1. Cambiar la ruta en la que esta la app. (Linea 15)
-- 2. Guardar el archivo y exportar en formato aplicación. (Menu: Archivo>Exportar)
using terms from application "Terminal"
tell application "Terminal"
activate
-- Abre y configura el terminal
set tab1 to do script
set currentWindow to front window
set position of currentWindow to {140, 60}
set number of rows of tab1 to 20
set number of columns of tab1 to 90
-- Tab1: Entra en el entorno virtual e inicia el servidor
do script "cd Desktop/Code/ruralhouses" in tab1
do script "source .env/bin/activate" in tab1
do script "python manage.py runserver" in tab1
delay 0.5
-- Tab2: Inicia gulp
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
set tab2 to tab 2 of currentWindow
do script "gulp" in tab2
delay 0.5
-- Tab3: Entra en el entorno virtual, abre el editor de texto
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
set tab3 to tab 3 of currentWindow
do script "source .env/bin/activate" in tab3
do script "atom ." in tab3
end tell
end using terms from