quinta-feira, 16 de outubro de 2014

How-To: Install Expect under Windows


Expect

Expect is a program to automate interactions with programs that expose a text terminal interface.

http://en.wikipedia.org/wiki/Expect



How-To install Expect under Windows:
 
Download ActiveTcl: (must be 32 bits!!!)
http://www.activestate.com/activetcl/downloads


C:\Tcl\bin>teacup.exe install Expect


And that´s it....

---
Lets Test it now:

Create a file test.exp



#!/bin/sh
# \
exec tclsh "$0"  ${1+"$@"}

# This is required to declare that we will use Expect
package require Expect

puts "\n\nI am Alive\n\n"





And Run:
C:\Tcl\bin>tclsh.exe d:\Desktop\test.exp

Should be running :)