关于新起一个进程处理弹窗口的另一种方式

2012-04-12  刘俊 

# 这个方法是利用ruby标准库中的timeout.rb中的timeout方法来处理没有click操作而弹窗的窗口,和以前Thread.new的方式类似,记录下来
def pop(url,n)
    begin
      Timeout::timeout(6) do
        @ie.goto(url)
      end
    rescue Timeout::Error => e
      puts e.message
    end
    @autoit = WIN32OLE.new("AutoItX3.Control")  
end
343°/3431 人阅读/0 条评论 发表评论

登录 后发表评论