The tool used is "XMacro", that as stated in the tool website:
The XMacro package contains two simple, C++ programs (xmacrorec and xmacroplay) for recording and replaying keyboard and mouse events on an X serverSo let's start record a macro, with this command:
xmacrorec2 > test.macro
Now you should see something like this:
Server VendorRelease: 11103000 XRecord for server ":0.0" is version 1.13. Press the key you want to use to end the application. This key can be any key, as long as you don't need it while working with the remote display. A good choice is Escape.
Two things important here, the ":0" is your display number, it will be needed to play your macro. And the stop key to stop the macro recording, as suggested by the tool, just hit Esc to proceed and then Esc again when you want stop the macro recording.
To play the macro, just use this (don't forget to use your display number):
cat test.macro | xmacroplay :0
Now you should see your mouse/keyboard or whatever you recorded, repeating the process. As you will see, the macro speed is very fast, if you want place some delay between the actions, just edit the .macro file and place a delay command line (delay in seconds):
Below you can see an example where the macro will create a file named "a.txt" with some content using the nano bash editor and then move the terminal window:
About the versions
- xmacrorec2 0.3
- xmacroplay 0.3
- Linux Ubuntu 12.04