
Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
I just wondered.. are there any terminals*, plugins for terminals, or plugins for tmux, that will scan output and automatically send canned responses -- whilst still letting me interact normally the rest of the time?
And secondly -- are there any tools that will simply let me assign hotkeys or macros to be automatically typed upon being pressed?
Macro capabilities are usually provided by the application you're running, e.g., Emacs, Vi, Mutt, shell aliases, etc., so I would suggest looking first at what you're using and whether there are better tools for the task that provide the extensibility you need. If you ultimately do have to script terminal sessions, the only tool I know of is expect. Here's the Debian package description. Package: expect Version: 5.45-2 Description: Automates interactive applications Expect is a tool for automating interactive applications according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. Expect is also useful for testing these same applications. And by adding Tk, you can also wrap interactive applications in X11 GUIs. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script. Homepage: http://sourceforge.net/projects/expect/