Re: "SendKeys" equivalent in Linux

From: Tony Lawrence (foo_at_pcunix.com)
Date: 07/24/05


Date: Sun, 24 Jul 2005 16:13:26 -0400

EKurtz99@aol.com wrote:
> In Windows it is possible to control one application from another by
> sending keystrokes to the buffer for that app. The technique is
> limited, of course, by what you can do via the keyboard in the driven
> app. Is there an equivalent in Linux?
>

Several.

One is just to use an input file:

yourapp < yourfileofkeystrokes

Another is to use Expect (see http://aplawrence.com/Books/expect.html )
which is usually the easiest way to do anything complicated.

Perl, Python etc. include the ability to open another program just as
you'd open a file and send keystrokes to it.

-- 
Tony Lawrence
Unix/Linux/Mac OS X  resources: http://aplawrence.com


Relevant Pages

  • "SendKeys" equivalent in Linux
    ... sending keystrokes to the buffer for that app. ... The technique is ...
    (comp.os.linux.misc)
  • Re: "SendKeys" equivalent in Linux
    ... >> another by sending keystrokes to the buffer for that app. ... That's limited to console programs. ... I've browsed the Xlib reference. ...
    (comp.os.linux.misc)
  • Re: Keystrokes and mouse clicks to another app
    ... I'm managing a project that will, as part of it, require me (so I'm ... I was therefore considering writing an app that will enter these ... by sending keystrokes and mouse clicks to ... IE6, you can also use its very useful object modelto do ...
    (microsoft.public.vc.mfc)
  • Re: Resource data
    ... The app presents spelling tests. ... Each test is derived from a single line in a txt input file. ... Just include it with a javascript script tag and the array q is available to you. ...
    (comp.lang.javascript)
  • Re: Resource data
    ... The app presents spelling tests. ... Each test is derived from a single line in a txt input file. ... Just include it with a javascript script tag and the array q is available ...
    (comp.lang.javascript)