[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Mouse click with win32api

Victor 'Zverok' Shepelev

3/14/2007 1:01:00 PM

From: list-bounce@example.com [mailto:list-bounce@example.com] On Behalf Of
Emil Sandin
Sent: Wednesday, March 14, 2007 2:46 PM
>
>Hi,
>I would like to write a script like this:
>
>mouse.move_cursor_to( x, y )
>mouse.click_left_button()
>
>I have read that I can use AutoIt, but that the program has to have an
>ole interface for it to be possible. That autoit doesn't really move the
>mouse cursor, but rather tells the program to click a certain
>coordinate.
>
>Is it possible to do this using win32api instead of autoIt, or is there
>another neat way of acheive it?

There is simple cpp code attached (as well as extconf for it).
It is compiled into extension, having module Rwin32::Emulate with methods
mouse_down!, mouse_up!, key_down!, key_up!

It can be used as is, or as a learning material of "how to do this". Any
questions are welcome. If somebody wants to do something more full-featured
on this basis, he is welcome too.

V.