How to “click” on the screen at scheduled time with Ruby?

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

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.

Mike S. wrote:

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.

Oh it is a book huh?

by the way someone was suggesting

I wonder if that is a pretty good solution too?

Jian L. wrote:

by the way someone was suggesting

Selenium

I wonder if that is a pretty good solution too?

The book also cover Selenium. Selenium I think is for web applications
whereas your first question was about native Windows GUI applications.

The book also covers Linux GUI situations.