in reply to Win32 Printing

If ya wanna go up the road with Win32::GuiTest, then this should be something for ya that makes it very simple. We open up the Internet Explorer print dialog box and now we just have to focus this and send it "ENTER" to start printing.
use strict; use LWP::Simple; use Win32::GuiTest qw( WaitWindowLike SetForegroundWindow SendKeys + ); my $url = q(http://www.cnn.com); my $fn = $ENV{TEMP}."\\test.html"; getstore ($url, $fn); my $prg = qq(start rundll32 mshtml.dll,PrintHTML "$fn"); system $prg; $_ = WaitWindowLike( 0, qr/Apply/i, undef , undef, undef, 10000) +; SetForegroundWindow($_); SendKeys ("{ENTER}"); print "Printed ",-s $fn, " bytes from $url";

Switches to mshtml.dll
%1 - File to print
%2 - Printer-name
%3 - Printer driver
%4 - Printer port

Replies are listed 'Best First'.
Re^2: Win32 Printing
by BrowserUk (Patriarch) on Nov 04, 2004 at 00:20 UTC

    Which version of GUITest do you have? Mine doesn't export a 'WaitWindowLike' function.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
      You need the one from CPAN, Win32::GuiTest. It comes with .ppd, which installed fine with perl 5.8.3-809.

        Thanks. I eventually found and installed it.

        I don't how I did it, but my first look on cpan turned up this.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail
        "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon