RobotScript is a scriptable, cross-platform desktop automation tool.
Statically linked binaries will be available for download here once the project is functional. In the meantime, feel free to build it yourself.
robotscript script.yml
Script files are written in YAML format. The commands are fairly self-explanatory/self-documenting. Here is a comprehensive example:
commands:
- mouse: # command: moves the mouse cursor
x: 200 # required: integer: x pixel
y: 200 # required: integer: y pixel
relative: false # optional: boolean: moves cursor relative to original position
smooth: true # optional: boolean: moves cursor smoothly instead of instantly
- click: # command: clicks a mouse button
button: left # required: string: mouse button (left, right, or center)
- keypress: # command: presses a key
key: c # required: string: key to be pressed (case insensitive)
mods: # optional: list<string>: modifier keys
- shift # note: this must be a list, even if there's only one
- sleep: # command: does nothing for some time
seconds: 1 # required: integer: seconds to wait
- type: # command: types some text
text: hello, world # required: string: text to be typed
- exec: # command: executes a program
program: stat # required: string: program to run
args: /tmp/fakefile # optional: string: command line arguments (not a list)
For a key naming reference, see here.
The following open source libraries have made my life much easier: