From: aidy Date: 2008-08-12T21:42:39+09:00 Subject: Re: if expression within a thread Bret, On Aug 12, 12:13 pm, aidy wrote: > > On Aug 11, 3:35 pm, Bret Pettichord wrote: > > > [Note:  parts of this message were removed to make it a legal post.] > > > Calls to windows API's will block *all* threads in Ruby. This is why Watir's > > click_no_wait method spawns a process and not merely a thread. > > > Bret Sorry for cross posting but I spawned this thread on Watir general as well Hi, autoit = WIN32OLE.new("AutoItX3.Control") Thread.new(autoit) do sleep 1 autoit.WinWait("Authentication Required", "") autoit.Send(username) autoit.Send("{TAB}") autoit.Send(password) autoit.Send("{ENTER}") end self.goto(url) I think autoit.WinWait executes faster than browser.goto => a hang. We need a sleep even if it is only for 0.1 secs I don't think we need to explicitly create another thread for self.goto as it is already in one. Aidy