From: Robert Klemme Date: 2003-10-06T06:18:44+09:00 Subject: Re: question about ruby under windows "James Britt" schrieb im Newsbeitrag news:3F80504F.2060002@seemyemail.com... > MENON Jean-Francois wrote: > > hello, > > > > is it possible in a ruby script to make Internet Explorer and/or > > Netscape open a URL? > > thx > > > > Something like this should work: > > > require 'win32ole' > ie = WIN32OLE.new('InternetExplorer.Application') > ie.visible = true > ie.navigate( "http://www.ruby-doc.org" ) > > > You can also use backticks to launch a browser as if from the command line: > > exe = 'e:/Program Files/mozilla.org/Mozilla/mozilla.exe' > url = "http://www.ruby-doc.org" > `start "#{exe}" "#{url}"` On most systems even: system( ENV["COMSPEC"], "/c", "start", "http://www.ruby-doc.org" ) which will launch the default browser. robert