Results 1 to 1 of 1

Thread: Switching focus Expect script

  1. #1
    Join Date
    Nov 2008
    Location
    Maine
    Beans
    1,126
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Switching focus Expect script

    Hi all,
    I have an expect script that opens up
    VMD. From within tha, I would like to send the VMD console the command to launch tkconsole. Doing this allows me to use both VMD & TCL commands. I can do this manualy, but I cannot seem to have the window shift control to the VMD terminal via the script.

    the code below, just launches VMD, then a seperate instance of tkconsole, in which I do not have access to VMD commands.

    Code:
    #!/usr/bin/expect
    spawn vmd
    expect "vmd >"
    send "tkcon\r"
    expect "%"
    echo "hello cruel world! \n\n my life is over\n\r"
    expect "%"

    I need the focus to be shifted to the vmd session, then the tkcon session, so I can proceed with sending more commands to the vmd initiated tkcon session.
    Does anyone have any ideas?
    Last edited by conradin; November 25th, 2011 at 12:25 AM. Reason: Acytualy, this is how its going down:
    ~Conradin~

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •