Hi, I would like to simulate a Mouse click through Ruby. Is there a way
to do this through Ruby? Does Ruby have any library for simulating
mouse events. Can someone provide me with some info on this topic.
Thanks in advance.
I think you'll need to provide a little more info to help people get started with this one. What GUI environment are you using and trying to make mouse clicks in?
Cheers,
Benj
···
On 24 Jan 2007, at 22:12, Kid Kid wrote:
Hi, I would like to simulate a Mouse click through Ruby. Is there a way
to do this through Ruby? Does Ruby have any library for simulating
mouse events. Can someone provide me with some info on this topic.
Thanks in advance.
Hi, I would like to simulate a Mouse click through Ruby. Is there a way
to do this through Ruby? Does Ruby have any library for simulating
mouse events. Can someone provide me with some info on this topic.
Thanks in advance.
KLUDGE:
Write a ruby script that outputs this to a file named Bot.java, runs
javac, then runs the JVM:
Thanks for the suggestion Ben, I would like to use ruby to simulate a
mouse click on any general Windows program such as Internet Explorer.
I'm aware that I can use WATIR to automate clicking on elements on the
webpages. However what i'm looking for is the ability to use Ruby to
issue a "Mouse click" no matter where the cursor is or what program is
running.
Thanks,
KidK
Benjohn Barnes wrote:
···
On 24 Jan 2007, at 22:12, Kid Kid wrote:
Hi, I would like to simulate a Mouse click through Ruby. Is there
a way
to do this through Ruby? Does Ruby have any library for simulating
mouse events. Can someone provide me with some info on this topic.
Thanks in advance.
I think you'll need to provide a little more info to help people get
started with this one. What GUI environment are you using and trying
to make mouse clicks in?
> Hi, I would like to simulate a Mouse click through Ruby. Is there a way
> to do this through Ruby? Does Ruby have any library for simulating
> mouse events. Can someone provide me with some info on this topic.
> Thanks in advance.
KLUDGE:
Write a ruby script that outputs this to a file named Bot.java, runs
javac, then runs the JVM:
Well, AutoIt is a fine automation program for windows, although it
uses it's own language. But the latest version also provides a DLL to
do this programmatically, so you should be able to interface Ruby with
the DLL and be all set.
Marcelo.
···
On 1/24/07, Kid Kid <gert365@yahoo.com> wrote:
Thanks for the suggestion Ben, I would like to use ruby to simulate a
mouse click on any general Windows program such as Internet Explorer.
I'm aware that I can use WATIR to automate clicking on elements on the
webpages. However what i'm looking for is the ability to use Ruby to
issue a "Mouse click" no matter where the cursor is or what program is
running.
Thanks,
KidK
Benjohn Barnes wrote:
> On 24 Jan 2007, at 22:12, Kid Kid wrote:
>
>>
>> Hi, I would like to simulate a Mouse click through Ruby. Is there
>> a way
>> to do this through Ruby? Does Ruby have any library for simulating
>> mouse events. Can someone provide me with some info on this topic.
>> Thanks in advance.
>
> I think you'll need to provide a little more info to help people get
> started with this one. What GUI environment are you using and trying
> to make mouse clicks in?
>
> Cheers,
> Benj
Thanks for the help Marcelo. Using AutoIt through Ruby does exactly what
I needed. Thanks!
Marcelo Alvim wrote:
···
Well, AutoIt is a fine automation program for windows, although it
uses it's own language. But the latest version also provides a DLL to
do this programmatically, so you should be able to interface Ruby with
the DLL and be all set.
In fact, if you've installed the Watir gem you already have the AutoIT
control installed. Just do something like this:
regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\watir\AutoItX3.dll
irb
require 'win32ole'
a = WIN32OLE.new("AutoItX3.Control")
a.ole_methods
Then review the AutoIT docs.
Nate
···
On 1/24/07, Marcelo Alvim <malvim@gmail.com> wrote:
Well, AutoIt is a fine automation program for windows, although it
uses it's own language. But the latest version also provides a DLL to
do this programmatically, so you should be able to interface Ruby with
the DLL and be all set.