APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

xmacroplay - controlling applications with a keystroke file

© August 2005 Tony Lawrence

There was a newsgroup post recently that asked:

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?

I responded with pointers to Expect and the simple case of "yourapp < yourkeyfile". I was almost immediately reminded that this advice was nearly useless for X11 apps, and a later post offered XMacro as a partial solution; it sends events to the whole server, not a specific app, so you'd need to do something to force focus. Possible wmctrl or something like it could help.

This little interplay reinforces a feeling I've been having recently that fewer and fewer Linux users care about the command line. I'm not saying it's totally dead, but apparently the GUI is much more important to most folks. GUI's are important to me, also: obviously most web pages are much more pleasantly viewed in a GUI. But I do tend to drop to a terminal window for almost anything else.

Will command line apps be completely gone soon? Unused antiques? I noticed that text editing tools weren't installed by default in the last Linux install I did - there's a sign of diminishing interest.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> xmacroplay - controlling applications with a keystroke file

Inexpensive and informative Apple related e-books:

Digital Sharing Crash Course

Take Control of IOS 11

Photos for Mac: A Take Control Crash Course

Take Control of Pages

Take Control of iCloud

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

The successful construction of all machinery depends on the perfection of the tools employed; and whoever is a master in the arts of tool-making possesses the key to the construction of all machines... The contrivance and construction of tools must therefore ever stand at the head of the industrial arts. (Charles Babbage)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode