# \[ANN\] First release of Automations: au3

**URL:** <https://www.ruby-forum.com/t/ann-first-release-of-automations-au3/175225>\
**Category:** Ruby\
**Created:** [September 9, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/ann-first-release-of-automations-au3/175225 "2009-09-09T23:16:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [September 9, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/ann-first-release-of-automations-au3/175225/1 "2009-09-09T23:16:46Z")

</div>

Hi there,

I’m happy to announce the first release of the au3 library which is part  
of the Automations project. This is the Windows equivalent of xdo I  
released a month ago for Linux X. As with xdo on a X server system, you  
can fake user input on Windows:

require “au3”

#Move the mouse  
AutoItX3.move\_mouse(100, 100)  
#Click somewhere  
AutoItX3.click(123, 456)

#Simulate Keyboard input  
AutoItX3.send\_keys(“ABC”)  
AutoItX3.send\_keys(“AB{ESC}C”) #“Presses” A and B, then [ESC] and then  
C.

#Get (pseudo) window handles  
window = AutoItX3::Window.new(“Run”)  
#Move it  
window.move(200, 200)  
#Bring it to the front  
window.activate  
#Close it  
window.close  
#Or force it to close by using processes.  
AutoItX3.kill\_process(window.pid)

au3 is build (surprise!) on top of AutoItX3, the DLL interface of  
AutoIt3. I uploaded prebuilt binaries on RubyForge (project site is  
[http://rubyforge.org/projects/auto/](http://rubyforge.org/projects/auto/) ), so you don’t have to compile them  
yourself. You have to copy the AutoItX3.dll file from AutoIt  
([http://www.autoitscript.com](http://www.autoitscript.com) ) in one of your PATH directories (the ruby  
bin dir, for example) if you want to use au3.

However, there’s a mysterious bug I wasn’t able to fix: When running the  
MinGW version the mouse functions only work when run from the MSYS  
prompt (and for mswin32, they do not work anyway). If you try from  
cmd.exe or from within your programming editor, they won’t do anything.  
Maybe that’s a restriction of my Vista machine, but if someone has a XP  
(or even a Windows 7, 😉 machine I would like to hear from you.

Install au3 via the RubyGems framework:  
gem install au3

Marvin
