[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: win32ole and printing from ie
From: Carlos Tirado <li_rubytalk () tremendo ! com>
Date: 2004-11-09 13:47:45
Message-ID: PC1700200411090846140088d24bf5a6 () khess
[Download RAW message or body]
----- Original Message ---------------
From: Hal Fulton <hal9000@hypermetrics.com>
Date: Tue, 9 Nov 2004 15:26:25 +0900
> I'm trying to figure out how to control Internet Explorer
> and go to a certain URL and print the page.
>
> The first part is easy.
>
> Printing, I have no clue.
>
> Anyone?
This works for me:
#
# use IE, navigate, print
#
url = 'http://www.ruby-lang.org/'
require "win32ole"
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = TRUE;
ie.navigate({'url'=>url})
sleep 0.01 while (ie.busy)
script = ie.document.script
printme = script.print();
--
C
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic