Re: [tkined] reading from standart input in tcl

Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Fri, 16 Oct 1998 08:39:01 -0500

>
> Hello
> Sorry for the experts in Tcl/Tk and Tkined users. I am just new
>in Tcl, I have been dealing with Expect language which is an extension
>of Tcl.

Well, this isn't really the place for expect questions. You might try
the expect home page or FAQ at http://www.cme.nist.gov/pub/expect

> I could not have succeded reading from standart input.
> In any language, it is something like below
> Please enter you name :
> read name
> echo $name...............
>
> But in tcl, as far as I see there is not any command like read
> I tried
> exec read name
> puts $name
> and also
> set name [exec read dummy]
> puts $name
> they both did not work
> I am sure I am misssing a very simple point, sorry again for
>these simple question
> Kind ragards
> kadir
>

If you are using expect, then the command is expect
e.g.

expect {Please enter} {send "$name"}

check out the man page. it has several good examples.

--
____________________________________________________________________________
Doug Hughes					Engineering Network Services
System/Net Admin  				Auburn University
			doug@eng.auburn.edu

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.