Chris McMahon wrote:
On 7/26/05, Scott Hanselman <[EMAIL PROTECTED]> wrote:
Why do folks do all this tricky stuff with Winclicker and starting new
instances of the ruby process?
I do this:
Thread.new { sleep 0.1; WindowHelper.new.push_alert_button }
ie.link(:id, "whatever").click #this causes an Alert()
I discovered this myself independently: the way to handle popups is
in another thread.
Those unfamiliar with threads accomplish the same
thing by handling popups in another process altogether.
Not entirely true. What we found here was that most of the times, when
a modal
dialog pops up, the calling process and all its child threads wait for
the modal dialog to be dismissed
before continuing executing. Spawning another process solves this
problem. In fact, in one of
my experiments I found that even when a child thread opens a modal
dialog, the owner thread
also waits till the dialog is dismissed. ( I was trying to check if it
is possible to call some of the
potential dialog creators like clicking etc., could be started off on a
separate thread)
(Some silly
people have handled popups with an entirely different script running
in another scripting *language* altogether...)
-Chris
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general