hello,
is it possible in a ruby script to make Internet Explorer and/or
Netscape open a URL?
thx
jf
hello,
is it possible in a ruby script to make Internet Explorer and/or
Netscape open a URL?
thx
jf
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}"
James Britt
jf
Yes. There’s several ways to do this. See [ruby-talk:83076] and
[ruby-talk:83082].
-austin
On Mon, 6 Oct 2003 00:58:10 +0900, MENON Jean-Francois wrote:
is it possible in a ruby script to make Internet Explorer and/or Netscape
open a URL? thx
–
austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.10.05
* 13.08.59
“James Britt” jamesUNDERBARb@seemyemail.com 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?
thxSomething 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