I use Ruby at home for my personal stuff (since the late 1990s), and
I'm reasonably familiar with it but I'm not an expert. I'd like to do
something which is way outside anything which I've done before, which
(1) First something I can do: use Ruby to create an HTML file on my
home computer. The links are likely to only be to files on my home
computer, but they might also be to WWW pages and/or resources.
(2) Next something I've just found I can do: use Ruby to load that
file into an already running browser (Firefox or Chrome) so it
displays. I've just searched the WWW for command line options for
Firefox, and there are options to open a URL in a new window or tab; I
just tried it using using Kernel#system and it works as it looks like
(3) Now for the point of this: on the page loaded into the browser
will be several options, indicated by text/and or images, and I want
to be able to select one of those options, preferably by a left or
right mouse click, and then have the controlling Ruby program told
which option was selected. I might want to successively select several
options, and then finally select an option to tell Ruby to close the
browser tab being displayed.
(4) For example, one use will be to display some thumbnail images, and
select one of the thumbnail images and do something with it, for
example: rename it; move it; display its full size image from Ruby
using, for example, Kernel#system to run an image viewer, or - as I
just learned - to open a browser page.
(5) The tricky bit, which is something I can't - yet - do, is (3),
that is selecting one of the displayed options and then have the
controlling Ruby program told which option was selected.
(6) I've been toying with the idea of maybe using PHP or some
somehow pass an appropriate message back to Ruby about the type of
(7) Does anyone have any suggestions for a not too difficult way to do
this? I could maybe use something like AutoIt, which I've used in the
past to control a browser, but I found that a bit messy. I've wondered
about using something like Watir, but I'm not sure it can do what I
want, and even if it can I wonder if it might be a bit
over-complicated for what I'd like to do: but if complicated is the
only way to do it, I can live with that. I'm even OK with doing
something like using a (simple) web-hosting site as a server, but I'm
not at all sure that would be a good solution, because files to be
loaded as "WWW" pages in browser tabs are going to be created "on the
Thanks in advance for any assistance.