Open a dialog in Internet Explorer : Internet Explorer « Windows Platform « Ruby






Open a dialog in Internet Explorer


require "win32ole"

def ieInputBox( msg, default )
  ie = WIN32OLE.new("InternetExplorer.Application");
  ie.visible  = false
  sleep 0.01 while (ie.busy)

  script = ie.Document.Script;
  result = script.prompt(msg,default);
  ie.quit

  result
end

result = ieInputBox( "Please enter your name",
                     "Dave Bowman")

if result
  puts result
else
  puts "User pressed Cancel"
end

 








Related examples in the same category

1.Access to Windows Automation is provided by Ruby's WIN32OLE.
2.uses the ReadyState property to determine when Internet Explorer has successfully finished loading the page.
3.Get parsed html document
4.Load home page with Internet Explorer
5.make it navigate to a particular page.
6.Display your html document in a Internet Explorer