Demos

Expect for Windows includes a number of demonstration
applications to help you get started. These demos are installed in
the demos\Expect directory beneath the Tcl
installation directory (by default,
C:\Tcl\demos\Expect).

The Remote Ls demo and the Wrap Remote
Ls (both described in the remotels.tcl section below) are also accessible
from the ActiveState Expect for Windows program
group on the Windows Start menu. These are the only demos with
graphical (as opposed to console) interfaces; therefore, they are
the only demos that can be run from the Start menu. The other demos
must be run from the command line. The Wrap Remote
Ls demo requires that the Tcl Dev Kit is
installed, as it uses TclApp for wrapping.

The instructions for running these demos assume that the
Tcl\bin directory is in your system's PATH environment
variable. If this is not the case, in the instructions for running
the demos, substitute the full path to the tclsh
interpreter.

This demo is a simple application that "sings" (types) 99
Bottles of Beer on the Wall in the manner of a singing,
beer-drinking typist, with predictable degradation as more bottles
of beer are consumed.

To run the demo, change to the Expect demos directory (by
default, C:\Tcl\demos\Expect) and enter:

tkremotels.tpj

If you are using ActiveState's Tcl Dev Kit, the
"tkremotels.tpj" project file can be opened using the TDK's TclApp.
TclApp uses the project file to build a standalone executable that
contains the tkremotels script.

This demo retrieves US weather data from an open server. It
accepts a three-character National Weather Service region code (or
a two-character state code, which returns the associated region
code) as input.

To run the demo, change to the Expect demos directory (by
default, C:\Tcl\demos\Expect) and enter:

tclsh weather.tcl state | region

The two-character state abbreviation (eg CA =
California) returns a list of three-character abbreviations of
National Weather Service regions for that state. The
three-character region abbreviation returns the weather
for that region.

weather.tpj

If you are using ActiveState's Tcl Dev Kit, the
"weather.tpj" project file can be opened using the TDK's TclApp.
TclApp uses the project file to build a standalone executable that
contains the tkremotels script.