[ANN] au3-0.1.0 released

Hello Rubyists,

A new version of the au3 gem, which is part of the Automations
project[1], has been released. It’s no longer a C extension, but
Ruby-only, thanks to the win32-api gem from the win32utils[2] project,
so there’s no need to compile it for every Ruby platform. Just download
it as if it’s a normal gem (which it is indeed now).

au3 allows you to automate and simulate (fake) user input to a Microsoft
Windows system. This includes mouse and keyboard simulation as well as
window manipulation. For example:

require “au3”

#Window manipulation

AutoItX3.run(“mspaint.exe”)
sleep 1
paint = AutoItX3::Window.new(AutoItX3::Window::ACTIVE_WINDOW)
paint.move(300, 300)
paint.close

#Mouse simulation

AutoItX3.mouse_click(100, 100)
AutoItX3.drag_mouse(0, 0, 50, 50, “Right”)

#Keyboard simulation

#Send A, B and C keystrokes, than an
#[ESC] keystroke
AutoItX3.send_keys(“ABC{ESC}”)
#Same as above, but ignore special
#escape sequences (so send the “{ESC}”
#characters instead of the [ESC] keystroke)
AutoItX3.send_keys(“ABC{ESC}”, true)


This library is not only inspired by AutoIt, it uses the DLL interface
that is named AutoItX. For that reason you have to have the
“AutoItX3.dll” file somewhere in your PATH, the easiest way to get it is
just to download AutoIt from http://www.autoitscript.com and copy the
file into your Ruby’s bin directory.

This library is Ruby 1.9-only.

Have fun!

Marvin

[1] http://rubyforge.org/projects/auto/
[2] http://rubyforge.org/projects/win32utils/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs