Easy to use AutoHotkey/AutoIT alternatives for Linux
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 AHK:

    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 AHK:

----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 its definitely no AHK. They're great for more advanced stuff, but surely, there has to be some tool out there for easy GUI automation?


PS: I've already tried running AHK with Wine but sending keystrokes and hotkeys don't work.
Easy to use AutoHotkey/AutoIT alternatives for Linux
===

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 AHK:

    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 AHK:

----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 its definitely no AHK. They're great for more advanced stuff, but surely, there has to be some tool out there for easy GUI automation?


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