On Tue, Oct 26, 2010 at 3:20 AM, Mike Stephens <rubfor / recitel.net> wrote:
> I am trying to design an application that scripts a GUI to expose its
> functionality as a set of web services.
>
> Under Windows, I can start one or more instances of the GUI and then
> start a Ruby program which obtains a reference to one of the GUIs and
> scripts it using Win32API.
>
> I need a continuously running Ruby program (the Manager) that holds
> references to each GUI and maintains state information about which
> session id is assigned to the GUI instance and what screen the GUI is
> currently sitting on. This is to avoid starting up an instance for each
> call, and navigating to the relevant screen unnecessarily.
>
> What I thinking is when a web service call comes in I want the web
> service to connect to the Manager which will then check whether one of
> the GUIs is assigned to the session concerned and return a reference to
> the correct GUI so the web service can script it (or perhaps start up
> another instance if one is required).
>
> I could communicate with the Manager by some polling mechanism. But then
> again if I can use Win32API to connect to the GUI, I should be able
> somehow to connect to the Manager, although I not sure how I would
> pass data to and from it.
>
> How do people normally do this kind of thing?

you could look into using local sockets or PRC, not sure if there is a
gem to make this easier.


-- 
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1