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/ ), so you don't have to compile them
yourself. You have to copy the AutoItX3.dll file from AutoIt
(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
-- 
Posted via http://www.ruby-forum.com/.