Win32ole

Hi everybody, i´m trying to manage the mouse with Ruby. Like move it in
the
Desktop, clicking de Start button, like a macro.

Well, i would like to recive some information about that.

Thanks!

Agustín Ramos wrote:

Hi everybody, i?m trying to manage the mouse with Ruby. Like move it in
the
Desktop, clicking de Start button, like a macro.

Well, i would like to recive some information about that.

Thanks!

I’m fairly new to to win32ole myself, but I see it as more of a “ole”
interface (hence the name) than a “programming interface” (aka, API, as
in WIN32API).

Perhaps WIN32API is what you are searching for.

Now, certain applications that you might “new up” with WIN32OLE have
functions, like Excel has “sendleys()” where you can mimis keystokes.
Perhaps that is what you want to do.

They also have events, and you can set up event handlers. Study the
Object Model of the windows application you want to drive.

What I have found is this:

IF I knew the Object Model for the application I wanted to drive with
Ruby,
THEN actual implementation is pretty straight forward.
ELSE, without knowing the object model, you’ll find youself staring at
the screen.

Todd

Hi everybody, i´m trying to manage the mouse with Ruby. Like move it in the
Desktop, clicking de Start button, like a macro.

Well, i would like to recive some information about that.

You can move and click the mouse with AutoIt.
Try playing around with this code to get you started.
Use carefully.

require ‘win32ole’
mytest = WIN32OLE.new(“AutoItX3.Control”)

mytest.MouseMove(150,440)
sleep 1
#mytest.MouseDown(“Left”)
#mytest.MouseUp(“Left”)
mytest.MouseMove(250,240)
sleep 1
mytest.MouseMove(350,340)

Harry

On Jul 11, 11:39 pm, “Harry K.” [email protected] wrote:

mytest = WIN32OLE.new(“AutoItX3.Control”)


A Look into Japanese Ruby List in Englishhttp://www.kakueki.com/

Here’s a link to the AutoIt website (http://www.autoitscript.com/
autoit3/index.php) where you can download the program. This is a handy
utility for sure. I script it with Ruby for doing lots of monotonous
keyboard entry in old DOS programs that I have shelling out after
hours. I just pick up the DOS box’s window title and then go to town!