xdotool and xautomation are two command line X11 automation tools.
I've used the former for a while and only recently found out about the existence of the latter,
and I'm curious to know what someone who used both for a while has to say about them.
In particular:
-
Do they have the same intended usage? It seems so from the man pages but I could be missing some detail.
-
Are they equally supported in most systems? Or is one more widely used than the other?
-
Are there things that can be done with one but not the other?
Best Answer
xdotool
is a compiled program, you can use it from anywhere. And it may be pre-installed on your distribution. You orchestrate it with any scripting language. Comes recommended by many, but can get tedious when scripting more elaborate chains.An example command to be used within any scripting language/shell:
xdotool type "Hello Unix.StackExchange Reader"
More can be found starting here: xdotool
XAUT
"(formerly X Automation)" is a C Library and a Python module "to programatically simulate keyboard and mouse use, as well as manipulate windows. The inspiration for this came from AutoIt as well as AutoHotkey".On most recent distros
xaut
orxautomation
should also be available.An example
py
script could look like:This "forces" you to use Python, but if you do something more elaborate, like wanting to read input from AD or *SQL, you'll probably quickly appreciate the powers python gives you with the ecosystem of useful module it has.