10

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.

Andreas Bonini
  • 44,018
  • 30
  • 122
  • 156
majkinetor
  • 8,730
  • 9
  • 54
  • 72

5 Answers5

6

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
  • 395
  • 1
  • 8
  • 20
  • 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
5

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

ars
  • 120,335
  • 23
  • 147
  • 134
1

I guess AutoIt is what you need.

Helen
  • 87,344
  • 17
  • 243
  • 314
  • 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

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

brianegge
  • 29,240
  • 13
  • 74
  • 99
0

You could use pexpect, written in Python.

jjclarkson
  • 5,890
  • 6
  • 40
  • 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