Easy-to-use AutoHotkey/AutoIt alternatives for Linux

Xeddy picture Xeddy · Mar 17, 2010 · Viewed 28.8k times · Source

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.

Answer

noego picture noego · Jan 6, 2012

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.