title: how to run expect script on a given spawn id
body: <p>How to run bunch of expect scripts on spawnid from first expect script</p>
  
  <p>Here are the details:
  I have first expect script that shall spawn a application called openapp.
  Now i want to run tests(written in expect scripts - abc), that will do different validations on the spawned application id</p>
  
  <pre><code>#!/usr/bin/expect -f
  source home/tests/library.tcl
  set openapp [runapp]
  eval spawn $openapp
  set id $spawn_id
  login
  puts [exec home/tests/testsuite/abc $id]
  expect eof
  
  </code></pre>
  
  <pre><code>#!/usr/bin/expect -f
  sourcehome/tests/library.tcl
  puts 2ndscript
  set bbb [lindex $argv 0]
  puts $bbb
  send -i $bbb "t\r"
  expect eof
  
  
  </code></pre>
  
  <p>Here are results i get:</p>
  
  <p>exp5
  2ndscript
  exp5
  can not find channel named "exp5"
      while executing
  "send -i $bbb "t\r""
      (file "/home/tests/testsuite/abc" line 6)
      while executing
  "exec home/tests/testsuite/abc $id"
      invoked from within
  "puts [exec home/tests/testsuite/abc $id]"
      (file "/home/tests/testsuites/xyz" line 7)</p>
  
  <p>I am not able to run expect commands on spawnid from other script</p>