On 2/17/06, Chris Schmechel <[EMAIL PROTECTED]> wrote: > > I was able to write a Perl Win32::GuiTest to do the following: > > @window = FindWindowLike(0,"File Download",""); > SetForegroundWindow($window[0]); > SendKeys("{SPACE}"); >
It seems pretty common for people to call a helper script like the one above in order to unblock IE after a browser action that spawns a popup. I ran into at least one case where running a small helper Ruby script similar to the above was the only way to dismiss a certain pesky popup window. One pattern to solve this is: - start a ruby thread inside it, click the link/button or whatever that causes IE to block - sleep a bit in between the thread definitions (or write some code that will wait until the popup window you're watching for appears) - start another thread inside it, use system() to execute your helper script, which hopefully dismisses the popup - join both threads and resume program flow, assuming the popup has been dismissed and the call to IE that spawned the popup has now returned Thanks Bill _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general