[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

windows automation language

Martin DeMello

3/22/2005 11:46:00 AM

Don't know enough about win32 programming to say if this is interesting,
but it claims to do things vbscript cannot, so ruby bindings to the dll
might be useful.

http://www.autoitscript.com/autoit3...

martin
3 Answers

Chris McGrath

3/22/2005 1:27:00 PM

0

It's got a COM interface, so you can use WIN32OLE to drive it. It does
look interesting, alas I haven't had time to properly look at it yet.

Chris

On Tue, 22 Mar 2005 20:49:50 +0900, Martin DeMello
<martindemello@yahoo.com> wrote:
> Don't know enough about win32 programming to say if this is interesting,
> but it claims to do things vbscript cannot, so ruby bindings to the dll
> might be useful.
>
> http://www.autoitscript.com/autoit3...
>
> martin
>
>


Cristi Balan

3/22/2005 6:01:00 PM

0

On Tue, 22 Mar 2005 22:26:30 +0900, Chris McGrath <c.r.mcgrath@gmail.com> wrote:
> It's got a COM interface, so you can use WIN32OLE to drive it. It does
> look interesting, alas I haven't had time to properly look at it yet.
>
> Chris
>
> On Tue, 22 Mar 2005 20:49:50 +0900, Martin DeMello
> <martindemello@yahoo.com> wrote:
> > Don't know enough about win32 programming to say if this is interesting,
> > but it claims to do things vbscript cannot, so ruby bindings to the dll
> > might be useful.
> >
> > http://www.autoitscript.com/autoit3...
> >
> > martin
> >
> >
>
>

Wow, thanks! trying this was easier than it should :)

- registered the dll (regsvr32.exe AutoItX3.dll)
- copied the vb example from the help chm in foo.rb
- put require 'win32ole' at the top of the file
- replace WScript.CreateObject with WIN32OLE.new
- ruby foo.rb

Thanks Martin, i just needed a nice keyboard automation tool just a
few days ago and this looks very nice

--
Cristi BALAN


daz

3/23/2005 11:52:00 AM

0


Martin DeMello wrote:
> Don't know enough about win32 programming to say if this is interesting,
> but it claims to do things vbscript cannot, so ruby bindings to the dll
> might be useful.
>
> http://www.autoitscript.com/autoit3...
>
> martin


As has been said by others, ruby bindings are hardly necessary when using
its COM interface:

http://www.rubygarden.org/ruby?AutoIt_F...

The example on the wiki may appear a bit tame but once you've
installed and registered the dll, it's just:

require 'win32ole'
au3 = WIN32OLE.new("AutoItX3.Control")

.... and over to AutoItX3 for the "methods".


daz