7

I am searching for a tool that behaves similarly to Unix's expect tool (or at least, its main function).

I want to automate command-line interactive programs with it.

EDIT: I am preferring single executables or small apps without big multi megabyte depencies.

Ty.

Thomas Bonini
  • 42,536
  • 29
  • 119
  • 156
majkinetor
  • 8,354
  • 9
  • 51
  • 69

5 Answers5

4

Take a look at ActiveState's Tcl distribution which has a port of Expect for Windows.

ars
  • 113,841
  • 22
  • 139
  • 133
4

Late answer: Expect.exe, compiled with Go, running Lua-scripts. Fairly new, but does exactly what it is supposed to do. See https://github.com/zetamatta/expect/

Check the closed issues as well.

Jan Ehrhardt
  • 345
  • 1
  • 6
  • 17
  • 1
    Absolutely perfect. It had a little bug when I first tried it, but the dev fixed it just a few hours after I opened the issue ❤ – vctls Dec 20 '19 at 15:57
1

I guess AutoIt is what you need.

Helen
  • 71,797
  • 10
  • 199
  • 256
  • AutoIt/AutoHotKey can't expect things from console apps. They are GUI automation tools. Plus AutoIt is slow as hell. – majkinetor Aug 14 '09 at 08:47
0

You could use pexpect, written in Python.

jjclarkson
  • 5,772
  • 5
  • 39
  • 62
  • Thanks, updated the URL for pexpect and removed the google code link. – jjclarkson Oct 07 '14 at 21:19
  • 3
    Sadly, pexpect only runs on *nix (and probably Cygwin): http://pexpect.readthedocs.org/en/latest/install.html#requirements This question is about Windows. – vadipp Oct 08 '14 at 01:24
  • It seems it does run on Windows as of version 4.0, with some caveats. – Keeely Nov 24 '21 at 11:28
-1

I your familiar with expect, then why not install Cygwin and run it that way?

brianegge
  • 28,163
  • 13
  • 72
  • 98