New to Ruby : Can anyone help

Hi
I am new to Ruby.
What I want to do is to start up an appliacation (GUI
of course) and use Ruby to move the mouse to the
application Button called Start and click on it when
it is active (ie not greyed out).
I can start the application by putting a shortcut in
the XP startup folder, and pass the file as input
parameter but how to use Ruby to move the mouse to
different buttons (three buttons in this app Start
,Continue , Cancel ) in the application windows
and click on it, and also how to test the button is
active before I can click on it.

My normal steps are :-

  1. double click on app.exe
  2. move mouse to File >> open >> datafile.dat
  3. move mouse to the START button ( which is active)
    in the application windows and double click the button

Basically I want to automate Step 1 ,2 and 3 above.

Can anyone help
Many thanks
Fred Johnsons

On 2 mar, 21:36, Studentfj [email protected] wrote:

  1. double click on app.exe
  2. move mouse to File >> open >> datafile.dat
  3. move mouse to the START button ( which is active)
    in the application windows and double click the button

Basically I want to automate Step 1 ,2 and 3 above.

What you are asking really has little to do with ruby, but more about
finding hooks in the windows API to do what you want (as it is a
somewhat obscure thing to do, you’ll probably find few people that
know how to).
You should ask your question in a windows programming newsgroup and
try searching microsoft’s knowledge base and forums for the answer.
If you then want to code the solution in ruby, ruby offers things like
the win32ole and similar modules to give you access to the proper API
calls in windows, but you need to know what those are first.

gga schrieb:

somewhat obscure thing to do, you’ll probably find few people that
know how to).

You could also look at AutoIt (http://www.autoitscript.com/autoit3). I
and other people on this mailing list have used it together with Ruby to
automate Windows. You should be able to find some examples in the
archives.

Regards,
Pit

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs