From: aidy Date: 2008-08-12T20:12:35+09:00 Subject: Re: if expression within a thread Bret, 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 Thanks for getting back autoit = WIN32OLE.new("AutoItX3.Control") m = Thread.new(self) {self.goto(url)} t = Thread.new(autoit) do sleep 3 autoit.Send(username) autoit.Send("{TAB}") autoit.Send(password) autoit.Send("{ENTER}") end m.join; t.join The 'goto' method waits for the page to load. If winole blocks threads in Ruby then the autoit thread would not get executed as there is an indefinite wait in the 'goto' method. Aidy