I've been trying to understand this all better myself and once i do, i
think i want to rework the code that we have so that users don't have to
think about threads or processes -- that really should be handled by the tool.
Like i said, i'm still trying to track down all the facts -- but at this
point it seems to me that WindowHelper (and thus AutoIT) can be called from
the same process (different thread) wheras winclicker needs to be in a
separate process. True?
Bret
At 08:57 AM 7/27/2005, Raghu Venkataramana wrote:
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
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general