[ANN] First release of Automations: au3

Discussion in 'Ruby' started by Marvin Gülker, Sep 9, 2009.

  1. 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/.
    Marvin Gülker, Sep 9, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. holger krekel

    [ann] first release of PyPy

    holger krekel, May 20, 2005, in forum: Python
    Replies:
    38
    Views:
    837
    Rocco Moretti
    May 30, 2005
  2. John
    Replies:
    12
    Views:
    799
    Duncan Booth
    Jan 22, 2007
  3. Marvin Gülker

    [ANN] First release of Automations: XDo

    Marvin Gülker, Aug 23, 2009, in forum: Ruby
    Replies:
    0
    Views:
    86
    Marvin Gülker
    Aug 23, 2009
  4. Marvin Gülker

    [ANN] au3-0.1.0 released

    Marvin Gülker, Oct 10, 2009, in forum: Ruby
    Replies:
    0
    Views:
    115
    Marvin Gülker
    Oct 10, 2009
  5. Marvin Gülker

    [ANN] au3 0.1.1 released

    Marvin Gülker, Dec 28, 2009, in forum: Ruby
    Replies:
    22
    Views:
    253
    Marvin Gülker
    Dec 30, 2009
Loading...

Share This Page