Hi Dave...
> > Look through the archives and you'll see mention of my handling
> > Javascript popups with a Perl Win32::GuiTest layer. I still think
> > that's a valid approach, with all due respect to the Wet and AutoIT
> > fans.
>
> Interesting. I've hardly touched Perl since I started with Ruby. I used to
> like
> Perl; I wonder If I can still handle it (Ruby seems to click easier with more
> complex data structures than simple arrays and hashes.) I'm going to have to
> dig up your Win32::GuiTest posts and have a play, I think, Chris.
Here ya go! Just BTW, the following code is in an article in next
month's Better Software magazine:
use Win32::GuiTest qw(FindWindowLike GetWindowText
SetForegroundWindow SendKeys);
system (1, "C:\\ruby\\bin\\ruby.exe C:\\watir\\examples\\Demo.rb");
while (1) { #INFINITE LOOP
sleep 5; #CHECK FOR NEW WINDOW EVERY 5 SEC
my @windows = FindWindowLike(0, "^Microsoft Internet Explorer"
);
for (@windows) {
SetForegroundWindow($_); #BRING THE RIGHT WINDOW IN FOCUS
SendKeys("{ENTER}");
}
}
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general