how to “click†on the screen at scheduled time with Ruby?

J

Jian Lin

Using Ruby, can I write a program, probably calling Win32 API, to
"click" on the screen at scheduled time, like every 1 hour?

Details:

This is for experimentation -- and can the clicking be effective on
Flash content as well as any element on screen? It can be nice if the
program can record where on screen the click needs to happen, or at
least draw a red dot on the screen to show where it is clicking on.

Can the click be targeted towards a window or is it only a general pixel
on the screen? What if some virus scanning program pops up and the click
is at the wrong window? (although if the program clicks on the white
space of a window first, then it can bring that window to the foreground
first).
 
M

Mike Stephens

You use HWND FindWindow() to get the window.

You need to read Scripted GUI Testing with Ruby. It tells you how to do
all this.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top