title: Tell AppleScript To Build XCode Project
body: <p>The following are the steps I would like to have:</p>
  
  <ol>
  <li>launch xcode</li>
  <li>open a specific xcodeproj file</li>
  <li>build and debug it</li>
  <li>quit xcode</li>
  </ol>
  
  <p>The following is my first attempt to write AppleScript:</p>
  
  <pre><code>tell application "Xcode"
      tell project "iphone_manual_client"
          debug
      end tell
      close project "iphone_manual_client"
  end tell
  </code></pre>
  
  <p>This only works when xcode has this project opened. I would like to have the project to be opened only when it is necessary to do so. </p>
  
  <p>Can any AppleScript gurus out there points me to the right direction? Thanks.</p>
  
  <p>-chuan-</p>