$imagename[i] = "#{$bb_id}" + "_" + "#{i}" + ".jpg" @save_path = "F\:\\Get_Image\\image\\#{$imagename[i]}" if File.exists?(@save_path) puts " " puts "Image " + "#{$imagename[x]}" + " already Exists! # Escape Save #" @save_flag = "NO" x = x + 1 else begin #implemented this to catch the dialog hanging timeout(5) do |timeout_length| pic = $ie2.image(:src, lnk[x]) pic.save(@save_path) # This is where the hanging occurs and not even the timeout exception triggers until I manually click the cancel on the dialog. Some time also there is broken links and save HTML dialog appears. I need to click cancel on any dialog that halts the saving operation puts " " puts "Image " + "#{$imagename[i]}" + " saved to " + "[EMAIL PROTECTED]" i = i + 1 @save_flag = "YES" end rescue TimeoutError =>e puts e hwnd = $ie2.enabled_popup(3) if (hwnd) # yes there is a popup w = WinClicker.new sleep 3 w.clickWindowsButton_hwnd( hwnd, "Cancel" ) w=nil end
any help appriciated _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general