I played around with win32-utils code, but I was getting odd results.
(It appeared that the fork() was really exec()ing the program in a
subprocess, rather than continuing the subprogram from the point of
the fork.) So I went back to popen.
I ran into a further problem. One button press
You might be interested in my venerable Perl controller below. It
launches a ruby script using system(1,), which returns control to the
calling process. A short explanation of how system() does this is
here: http://perlmonks.org/?node_id=547218
use warnings;
use strict;
use Win32::GuiTest
On May 16, 2007, at 11:43 PM, Bret Pettichord wrote:
3. Have the parent process spin, waiting for that file to be created,
then continue.
I wonder whether this is really what is happening. My guess is that it
is blocked...
[...]
I don't think you actually need to have the file polling
Brian Marick wrote:
I'll check it out. The only advantage over using popen is that you
don't have to have an executable ruby file (and know where to find
it). You can just require a watcher file and do the work without any
implicit or explicit exec.
I seem to remember seeing a
And here's the watcher script:
def initialize(title)
@autoit = Watir.autoit
@title = title
end
I don't know how interested you'd be, but if you'd like to try to
build a watcher with a Ruby GuiTest instead of autoIt, I'd be
interested in what happens:
Brian,
Thanks for your detailed report. As you no doubt have realized, Watir's
support (if it can be called that) for popups is none too good: awkward
and often unreliable. So your efforts are much appreciated. Personally,
I haven't had to deal with popups in my scripts, mostly finding ways to
I have been looking at the win32utils set of gems on rubyforge lately.
The win32-process gem includes a windows implementation of fork that may
be promising.
I looked at this some time ago, but it turned out be really stupid.
Sorry, I don't remember the details, but it quickly becomes clear