Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Using IE to render html

by alien_life_form (Pilgrim)
on May 08, 2002 at 13:46 UTC ( #165028=snippet: print w/ replies, xml ) Need Help??

Description: On Win32, the omni-{present,vorous} explorer control is a convenient way to render html on the fly. This is easy if you write it to a file - however doing it directly from a string requires some non-obvious component manipulation...
use Win32::OLE;
# standard IE manipulation
my $ie=Win32::OLE->new('InternetExplorer.Application');
die('Creating explorer window: ' . Win32::OLE->LastError())
  unless $ie;
# make visible
# hide a  lot of UI stuff
$ie->{AddressBar} =  $ie->{ToolBar} =  
                     $ie->{StatusBar} = $ie->{MenuBar} = 0;
# force the creation  of the document object
# this is not directly creatable.
my $doc=$ie->document();
die('Creating explorer document: ' . 
       Win32::OLE->LastError()) unless $doc;
sleep(1) while $ie->{Busy};
# if jscript is involved...
#$ie->Refresh(); # Shows jscript but crashes ie...why?
#...carry on...

Comment on Using IE to render html
Download Code

Back to Snippets Section

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://165028]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2015-11-28 08:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (739 votes), past polls