Mega Code Archive

 
Categories / Ruby / Windows Platform
 

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