title: iTerm applescript to write in two seperate verticle panes
body: <p>I am trying to write an applescript that:
  - opens a new window
  - changes directory
  - splits panes vertically into that same directory
  - writes text in the left pane
  - writes text in the right pane</p>
  
  <p>and if possible then executes both panes simultaneously.</p>
  
  <p>The closest I can get is doing similar but opening two separate windows. like so:</p>
  
  <pre><code>    tell application "iTerm"
         set myterm to create window with default profile
         tell myterm
            activate current session
            launch session "Default Session"
            tell the current session
               write text "cd ~/Desktop"
               write text "xcodebuild clean -workspace -scheme WelcomeScreenTests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=476E9E8C-8248-4EF6-8054-67900D603E83'  test | xcpretty"
            end tell
      end tell
      set myterm to create window with default profile
      tell myterm
         activate current session
         launch session "Default Session"
         tell the current session
            write text "cd ~/Desktop"
            write text "xcodebuild clean -workspace -scheme WelcomeScreenTests2 -sdk iphonesimulator -destination 'platform=iOS Simulator,id=F3DEA448-147B-4DDB-AD83-16D18BA1A87F' test | xcpretty"
         end tell
      end tell
  </code></pre>
  
  <p>Any help would be great thanks</p>