New to Ruby : Can anyone help

S

Studentfj

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



____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
 
G

gga

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.
 
P

Pit Capitain

gga said:
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 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top