Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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...
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-10-28 23:37 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (265 votes). Check out past polls.