Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby in WinXP as an automation tool

Reply
Thread Tools

ruby in WinXP as an automation tool

 
 
kevin.gc@gmail.com
Guest
Posts: n/a
 
      05-14-2005
Can anyone tell me if it can be done?

 
Reply With Quote
 
 
 
 
Adelle Hartley
Guest
Posts: n/a
 
      05-14-2005
Hi Kevin,
>
> Can anyone tell me if it can be done?
>


OLE object browser, in Ruby.

http://homepage1.nifty.com/markey/ru...e/index_e.html

Adelle.



 
Reply With Quote
 
 
 
 
James Britt
Guest
Posts: n/a
 
      05-14-2005
wrote:
> Can anyone tell me if it can be done?


Can you give examples of some tasks?

James


 
Reply With Quote
 
ruby talk
Guest
Posts: n/a
 
      05-17-2005
Hello,
AutoIT Does the job well. It has an application that will tell you
window names and lot of nice tools. It uses a vb like lang to program.
Becker

On 5/14/05, Alexey Verkhovsky <> wrote:
> wrote:
>=20
> >Can anyone tell me if it can be done?
> >
> >

> Yes.
> This is not a very informative answer, I suppose. What kinds of things
> do you want to automate?
>=20
> --
> Best regards,
>=20
> Alexey Verkhovsky
>=20
> Ruby Forum: http://ruby-forum.org (moderator)
> RForum: http://rforum.andreas-s.net (co-author)
> Instiki: http://instiki.org (maintainer)
>=20
>



 
Reply With Quote
 
Martin DeMello
Guest
Posts: n/a
 
      05-17-2005
ruby talk <> wrote:
> Hello,
> AutoIT Does the job well. It has an application that will tell you
> window names and lot of nice tools. It uses a vb like lang to program.
> Becker


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

martin
 
Reply With Quote
 
Pit Capitain
Guest
Posts: n/a
 
      05-17-2005
Martin DeMello schrieb:
> ruby talk <> wrote:
>
>>Hello,
>>AutoIT Does the job well. It has an application that will tell you
>>window names and lot of nice tools. It uses a vb like lang to program.

>
> http://www.rubygarden.org/ruby?AutoIt_For_Windows


I'm also using the AutoIT DLL driven by Ruby scripts. It really works
great and already has saved me a lot of key-presses and mouse-clicks.

Regards,
Pit


 
Reply With Quote
 
Bill Guindon
Guest
Posts: n/a
 
      05-17-2005
On 5/17/05, Pit Capitain <> wrote:
> Martin DeMello schrieb:
> > ruby talk <> wrote:
> >
> >>Hello,
> >>AutoIT Does the job well. It has an application that will tell you
> >>window names and lot of nice tools. It uses a vb like lang to program.

> >
> > http://www.rubygarden.org/ruby?AutoIt_For_Windows

>=20
> I'm also using the AutoIT DLL driven by Ruby scripts. It really works
> great and already has saved me a lot of key-presses and mouse-clicks.


Anybody have any samples of ruby/au3 scripts that are a bit more in
depth than the wiki example?
=20
> Regards,
> Pit
>=20
>=20



--=20
Bill Guindon (aka aGorilla)


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      05-17-2005
Bill Guindon wrote:
> Anybody have any samples of ruby/au3 scripts that are a bit more in
> depth than the wiki example?


No. But here's a script I just moved over to Ruby.

On a whim I started wrapping methods so that the core script would be a
bit tidier.

# Launch Firefox and check gmail for that
# special v1agr4 offer
require 'win32ole'

def set_up
@au3 = WIN32OLE.new("AutoItX3.Control")
@au3.opt("WinTextMatchMode", 2)
end

def browse_to( url )
@au3.Run( "e:\\Firefox\\firefox.exe #{url}" )
end

def enter
@au3.Send( "{ENTER}" )
end

def tab
@au3.Send( "{TAB}" )
end


def wait( n )
@au3.Sleep( n.to_i )
end

def send s
@au3.Send( s.to_s )
end

def wait_for_title t
@au3.WinWaitActive( t.to_s )
end


set_up
name = 'my.name'
password = 'fake-password'
browse_to 'http://www.gmail.com'
wait_for_title "Welcome to Gmail"
# Make sure whole page has
# load over flakey WiFi
sleep 5
send name
tab
send password
enter
# The end.



James


 
Reply With Quote
 
Bill Guindon
Guest
Posts: n/a
 
      05-18-2005
On 5/17/05, James Britt <> wrote:
> Bill Guindon wrote:
> > Anybody have any samples of ruby/au3 scripts that are a bit more in
> > depth than the wiki example?

>=20
> No. But here's a script I just moved over to Ruby.
>=20
> On a whim I started wrapping methods so that the core script would be a
> bit tidier.


Thanks much for the example, gives me a good place to start.

--=20
Bill Guindon (aka aGorilla)


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      05-18-2005
Alexey Verkhovsky wrote:
> On 5/17/05, James Britt <> wrote:
>
>>> No. But here's a script I just moved over to Ruby.
>>>

>
> By the way, if I have a .dll (such as AutoIt) somewhere in
> my_project/ext, and I want it to work in "download, start, No Step Three
> (TM)" manner - no changes to Windows registry, no copying of files to
> c:\WINNT, no other installation to speak of.
>
> In this case, what should this line be preceeded with:
> @au3 = WIN32OLE.new("AutoItX3.Control")



Good question. The DLL is going to get loaded, I think, by the WIN32OLE
wrapper, no? So it needs to know where t look, or the dll has to be
someplace it knows to look.

Does the AutoIT.dll have to be registered (via regsvr32 or something)
before win32ole can use it?

Time to go experiment ...

James


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] doit - automation tool 0.8 released Eduardo Schettino Python 0 05-17-2010 02:11 PM
Supressing the ctrl-c and other keys during word automation in automation apondu ASP .Net 0 07-19-2007 09:10 PM
Free Browser Automation tool PAMIE2b now available for download calfdog@yahoo.com Python 0 01-12-2006 07:46 PM
OpenSource Automation tool - Pamie 1.5 released calfdog@yahoo.com Python 0 06-03-2005 05:03 AM
Re: Help: Method invocation using an automation tool. D. Lane Java 0 06-27-2003 10:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57