How To Record And Play Mouse And Keyboard Events Using Atbswp Macro Recorder (GUI)

Atbswp is a new graphical utility (Python3) that can be used to record the mouse and keyboard events. You can then reproduce (play) them identically as many times as you want by either clicking a button, or save the mouse and keyboard actions as a script and run it without having to relay on Atbswp.The application is an open source clone of the Windows-only TinyTask utility (which is now discontinued), which runs on both Windows and Linux with Xorg, with Wayland support “coming soon”.
This application can be useful to automate some demo for example, or to perform long tasks that require clicking on the same items over and over again. In case you want to automate repetitive typing (text expansion), I recommend AutoKey instead.
Atbswp desktop automation tool features:

  • Record and play the mouse movement / clicks and keyboard presses on demand
  • Save the capture (macro) as a script and run it independently of Atbswp
  • Can use hotkeys to start recording and playback
  • Allows repeating a capture for a given number of times or indefinitely

It’s important to mention that the user interface elements need to be in the same position when recording the macro and when playing it back. Atbswp doesn’t have image recognition to identify user interface elements, like SikuliX for example.
You might also like: How To Bind Mouse Buttons To Keyboard Keys Or Commands (Linux Using X11)

How to use Atbswp desktop automation tool to record your mouse and keyboard actions, and play them back automatically on demand

I’ll start by showing you a short video demo of Atbswp macro recorder, then I’ll explain how to use it to record and play your mouse movement and clicks, as well as the keyboard key presses:
In this video I begin by clicking Start/Stop Capture in Atbswp, then perform some mouse and keyboard actions. Then I stop the capture in Atbswp by clicking Start/Stop Capture again, and finally I click Play to let Atbswp play back the keyboard and mouse actions it recorded.
This is how to use Atbswp keyboard and mouse macro recorder.1. Start capturing the mouse and keyboard events
To start capturing your mouse movement and clicks, as well as keyboard key presses, click the Start/Stop Capture button. 2. Stop capturing
When you’re done capturing everything you need to play back later, press the Start/Stop Capture button again to stop capturing.3. Run (play) your capture
To execute the mouse and keyboard events that you’ve recorded, click the Play button.Optional: Save capture for future use
To save the capture on disk for future use, so you can load it in Atbswp and play it without having to record it again, click the Save button.Optional: Save the capture (macro) as a script
You can save the recorded mouse and keyboard events as a stand-alone script that you can later run independently of Atbswp. This can be done by clicking on the Compile to executable button. Once saved, make the file executable (e.g. chmod +x capture.pyc), and run it in a terminal (./capture.pyc in the folder where you saved capture.pyc) or by double-clicking on the file (if your file manager allows this).

Download/Install Atbswp

The Atbswp macro recorder project page has installation instructions for Fedora, Debian (and Debian-based Linux distributions like Ubuntu, and distros based on Ubuntu such as Pop!_OS, Zorin OS or Linux Mint) and Microsoft Windows. Use the instructions from there to download and run it.The Debian (and Ubuntu) installation instructions from the Atbswp GitHub project page are not correct though. Edit: the developer has accepted my PR for fixing the installation instructions on Debian/Ubuntu, so I have removed the instructions from here – you can find them on the Atbswp desktop automation tool GitHub project page.
Each time you want to launch Atbswp desktop automation tool you’ll need to open a terminal, navigate to the folder where you’ve cloned the Atbswp Git repository, and run python3 atbswp/ there, e.g. (assuming you’ve cloned Atbswp in your home directory):

cd ~/atbswp

python3 atbswp/

Or you can create a new applications menu entry (using an application like MenuLibre for example) with python3 /path/to/atbswp/ (replace with the path to atbswp/ as the Exec command.