Bill,

Just out of interest I tried a variation on your script with 3 buttons to
open up the html file.  One button used System, one used the windows
shell (via OLE) and one used OLE to control IE directly.

On my machine (w2k), Shell takes the longest, system is slightly quicker,
and OLE is pretty much instantaneous.  Doesn't answer your question but
gives an alternative but only if you use IE.

Code is below (cut and pasted your code so I'm using your original style).

use strict ;
use Tk ;
use Win32::OLE;
        
 my $file = 'c:\\temp\\contents list.html';
 system ( $file ) ;

 my  $mw = MainWindow
         -> new ( -title => 'Test Window' ) ;

 my  $b = $mw
            -> Button
                 ( -text  => "Shell"
                 , -borderwidth => '1'
                 , -padx => '4'
                 , -relief => 'raised'
                 , -command => \&shellpress
                 )
            -> pack() ;


 $mw-> Button
                 ( -text  => "System"
                 , -borderwidth => '1'
                 , -padx => '4'
                 , -relief => 'raised'
                 , -command => \&systempress
                 )
            -> pack() ;

 $mw-> Button
                 ( -text  => "OLE"
                 , -borderwidth => '1'
                 , -padx => '4'
                 , -relief => 'raised'
                 , -command => \&olepress
                 )
            -> pack() ;

     MainLoop ;

sub shellpress {

   my $shell = Win32::OLE->new( "Shell.Application" );
   my $open = $shell->Open( $file );
}

sub systempress {
   my  $r = system ( $file ) ;
}

sub olepress {
  my $ie = Win32::OLE->new('InternetExplorer.Application');
  $ie->{Visible} = 1;
  $ie->Navigate( $file );
}

Kev.

-----Original Message-----
From: "Conrad, Bill (ThomasTech)" <     >
To: [EMAIL PROTECTED]
Subject: RE: PERL TK Question
Date: Mon, 29 Dec 2003 10:38:06 -0500

Hi All

        This analysis of my programming style is this first I have heard. My
style was developed as a result of teaching structured programming. I found
students learned the concepts of Objects and Relationships by placing these
on separate lines with indenting to show what was contained in what. By
lining the commas up with the parenthesis on the left it was more obvious
what the structure was. It was easier for the Student to identify what I was
discussing and to add their own comments to each line. It was just my way of
doing things. I don't criticize anyone else for their way of doing things.
To each his own. But I do find it more difficult to understand a Script that
has everything written on one line. When I write code, Every Line is
Documented to give the next person a better chance to understand what I have
done. I find that very lacking in much of what I see today.

        But the style of my coding wasn't the object of my question. I just
find it hard to believe that it was such an issue and my original question
wasn't given much thought. 

Sorry to those I may have offended.

Bill Conrad

This e-mail is confidential and may contain legally privileged information.  You 
should not disclose its contents to any other person.  If you are not the intended 
recipient, please notify the sender immediately.

Whilst the Council has taken every reasonable precaution to minimise the risk of 
computer software viruses, it cannot accept liability for any damage which you may 
sustain as a result of such viruses.  You should carry out your own virus checks 
before opening the e-mail (and/or any attachments).

Unless expressly stated otherwise, the contents of this e-mail represent only the 
views of the sender and do not impose any legal obligation upon the Council or commit 
the Council to any course of action.


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to