automate keypress in Expect or TCL

millertimebjm_at_yahoo.com
Date: 12/30/04


Date: 30 Dec 2004 06:23:41 -0800

I'm attempting to automate a test script that involves entering a linux
box via telnet and walking through a menu system. The only way to exit
this menu system is with an f4 key press. I'm pretty new to Expect and
TCL. I need the solution to be in Expect or TCL because this .tcl file
could be downloaded onto any one of ten pc's, and I don't want to be
downloading other software on there as well just to press the F4 key.
Is there any simple solution to this? I've been looking at bind and
keysym. Could I bind F4 to a key I don't use much...like 'z'? :)
Thanks for looking,
Brandon



Relevant Pages

  • Re: automate keypress in Expect or TCL
    ... >box via telnet and walking through a menu system. ... >this menu system is with an f4 key press. ... I need the solution to be in Expect or TCL because this .tcl file ... >downloading other software on there as well just to press the F4 key. ...
    (comp.lang.tcl)
  • Re: tclkit.exe and multiple threads
    ... options, setupdirs, unpack, tcl, mk, res, ...
    (comp.lang.tcl)
  • Re: Tcl [exit] hanging?
    ... > Jeff Godfrey wrote: ... what could possibly cause the exit message to be printed to the ... The Tcl threading layer needs some work, ...
    (comp.lang.tcl)
  • Re: Reading key presses
    ... TCL and Forth, that works along the lines you suggest already. ... Carrying out an interactive session in a TK text widget's window I ... to check if there is a key press waiting to be read. ... get a key press and for TCL to return it without displaying anything, ...
    (comp.lang.tcl)
  • Re: Reading key presses
    ... For Tcl getting info from Forth, I'd suggest for the Forth program to always put a newline at the end and use gets. ... Since you say you are doing a GUI, for interaction with the user you want to know how Tk can detect a key press. ... Note -- Tk will require you to do event based programming, so you will also want to use the fileevent command on the pipe that Tcl is getting info from Forth on. ... I suggest that you take a look at the Tcl/Tk wiki for examples and explainations. ...
    (comp.lang.tcl)