24

I'm looking for recommendations for an easy-to-use GUI automation/macro platform for Linux.

If you're familiar with AutoHotkey or AutoIt on Windows, then you know exactly the kind of features I need, with the level of complexity. If you aren't familiar, then here's a small code snippet of how easy it is to use AutoHotkey:

InputBox, varInput, Please enter some random text...
Run, notepad.exe
WinWaitActive, Untitled - Notepad
SendInput, %varInput%
SendInput, !f{Up}{Enter}{Enter}
WinWaitActive, Save
SendInput, SomeRandomFile{Enter}
MsgBox, Your text`, %varInput% has been saved using notepad!

#n::Run, notepad.exe

Now the above example, although a bit pointless, is a demo of the sort of functionality and simplicity I'm looking for. Here's an explanation for those who don't speak AutoHotkey:

----Start of Explanation of Code ----

  • Asks user to input some text and stores it in varInput
  • Runs notepad.exe
  • Waits till window exists and is active
  • Sends the contents of varInput as a series of keystrokes
  • Sends keystrokes to go to File -> Exit
  • Waits till the "Save" window is active
  • Sends some more keystrokes
  • Shows a Message Box with some text and the contents of a variable

  • Registers a hotkey, Win+N, which when pressed executes notepad.exe

----End of Explanation----

So as you can understand, the features are quite obvious: Ability to easily simulate keyboard and mouse functions, read input, process and display output, execute programs, manipulate windows, register hotkeys, etc. - all being done without requiring any #includes, unnecessary brackets, class declarations, etc. In short: Simple.

Now I've played around a bit with Perl and Python, but it's definitely not AutoHotkey. They're great for more advanced stuff, but surely, there has to be some tool out there for easy GUI automation, right?

PS: I've already tried running AutoHotkey with Wine, but sending keystrokes and hotkeys don't work.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Xeddy
  • 249
  • 1
  • 2
  • 3
  • i think that Syngergy+ does this for most platforms including windows and linux, as well as some other things – plod Mar 17 '10 at 08:13
  • Edit: Just to make it clear, I'm not averse to using a language with a well-defined syntax. (I mean, I know how AHK is often associated with novice/noob/non-programmers, but FYI I'm quite comfortable programming in C/C++ and Java) – Xeddy Mar 17 '10 at 08:20
  • @plod: From the website: "Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It's intended for users with multiple computers, where each system uses its own display. It's a little like having a 2nd or a 3rd desktop... " Is this the same Synergy+ you're talking about or is there more to it than that description? Because that doesn't sound anything like what I need... – Xeddy Mar 17 '10 at 08:23
  • yes it does do that, but it also allows you to create key bindings that go to one of the computers in its array. I used to use autohotkey to multibox games in the past I have seen people do this using Synergy+. I am not 100% which is why I left you a comment as apposed to an answer. – plod Mar 17 '10 at 12:33
  • Does recommended apps solved the problem ? If so you may consider approving the answer. Thanks. – koders Feb 15 '15 at 20:06
  • 1
    Related: [GUI scipting for Linux](https://softwarerecs.stackexchange.com/q/22896/3474) at SR.SE – kenorb Jun 02 '17 at 08:45
  • [See also ***AlternativeTo***](https://alternativeto.net/software/autoit/?license=opensource&platform=linux) (*"Crowdsourced software recommendations"*). – Peter Mortensen May 21 '20 at 14:09
  • 1
    Corresponding question on Ask Ubuntu: *[What is the equivalent tool for AutoIt in Ubuntu?](https://askubuntu.com/questions/822075)* – Peter Mortensen May 21 '20 at 20:05
  • It's been thirteen years, but [AHK_X11](https://github.com/phil294/AHK_X11) can run the same example script from your question on Linux (except you `Send` instead of `SendInput`) – phil294 Aug 14 '23 at 22:46

4 Answers4

10

I'd recommend the site alternativeto.net to find alternative programs.

It shows three alternatives for AutoIt: AutoKey, Sikuli, and Silktest. AutoKey seems up to the job.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
koders
  • 5,654
  • 1
  • 25
  • 20
  • `AutoKey` is very handy at handling hotkey-events and has a nice GUI interface. `pyautogui` could be used in conjunction for image/pixel searching, `python-libxdo` for reliable and robust window manipulation and key/mouse simulation, `zenipy` for showing dialogs. – NiMa Thr Jul 17 '18 at 18:52
  • That page now shows 19 (12 if only open source), in this order: *Sikuli*, *UI.Vision RPA*, *AutoKey*, *Actiona*, *OldAutoKey*, *xdotool*, *TagUI*, *Organize*, *Repeat*, *CloudQA*, *iMacros*, *Testim*, *T-Plan*, *atbswp*, *PhearJS*, *Quikey*, *Xnee**, *Gentee*, and *Silktest* – Peter Mortensen May 21 '20 at 14:16
8

IronAHK is being developed as a cross-platform flavor of AutoHotkey which can be used on Linux, but it's not a fleshed out product yet.

SouthStExit
  • 201
  • 1
  • 3
  • 9
    Just as a note for people just stumbling upon this, IronAHK is no longer (as of my writing) being worked on, but can be found open source [on git](https://github.com/polyethene/IronAHK). – Poik Jan 30 '13 at 18:12
  • If I download the source code, and compile it on Linux, would it work? – Galaxy Oct 11 '21 at 05:38
5

Sikuli lets you automate your interface using screenshots. It runs on any Java platform, so it is cross-platform.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
hoju
  • 28,392
  • 37
  • 134
  • 178
1

You should look at Experitest. I'm using the Windows version, but it's Java-based and I think it supports Linux as well.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
david
  • 11
  • 1