Automating regular manual procedures
Archive - Originally posted on "The Horse's Mouth" - 2005-04-21 07:06:04 - Graham EllisDo you want to automate a process that you normally run manually? If the process runs from a terminal window (or can be, even if you normally use a GUI), then have a look at Expect. With Expect, you spawn the process you want to automate, then programatically send inputs to it and expect responses. Very neat, very clever.
Expect is an extension of the Tcl language which gives you full capabilities of processing the results that you get back from the automated process, making conditional decisions and running loops based on the results returned.
If you want to run Expect through a GUI, you can do so using the Tk extension to Tcl, and if you want to run it via a Web interface, that's very practical too as you can run Tcl and Expect from your web server.