Automated development environment startup

By John Berry on November 19th, 2007

Tagged with: applescript, dev environment

Here's a little AppleScript I use to get my development environment up and running. It launches iTerm, gets the server running, creates a new tab in my project root, launches a TextMate project and starts CocoaMySQL.

The AppleScript:

 1  tell application "iTerm"
2 set PROJECT_DIR to "cd /YOUR/RAILS/PROJECT/DIR >"
3
4 tell the last terminal
5
6 activate current session
7
8 tell the last session
9 set name to "Server"
10 write text PROJECT_DIR
11 write text "clear"
12 write text "script/server"
13 end tell
14
15 launch session "Default Session"
16 tell the last session
17 set name to "Project"
18 write text PROJECT_DIR
19 write text "clear"
20 end tell
21
22 end tell
23 end tell
24
25 tell application "Finder"
26 activate
27 open document file "MyProject.tmproj" of folder "Desktop"
of folder "myusername" of folder "Users" of startup disk
28
29 end tell
30
31 tell application "Finder"
32 activate
33 open application file "CocoaMySQL.app" of folder
"Applications" of startup disk
34 end tell

You can create your own AppleScripts with the OS X Script Editor application. (in Applications -> AppleScript)

 

Comments

Weigh in

(HTML tags are stripped, URLs are automatically converted to links)