Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Perl Programming Language

Editor


I'd like to display the contents of a file to users giving them the
opportunity to search or scroll, but not allow them to change or
save.  I can't use the "type" command because the files are too
large.  Any suggestions?

This is what I'm currently doing, but need another method.

$myfile = $sortedarray[$input];
$mypath = '\\\\tlrntfs1\\IT_Common\\output\\';
$myprogram = '"C:\\Windows\\notepad.exe"';
$mycommand = $myprogram.' "'.$mypath.$myfile ;
system($mycommand);

tyjb <tyj@yahoo.com> wrote in message-id:  <1181048720.607380.47@g4g2000hsf.googlegroups.com>

>I'd like to display the contents of a file to users giving them the
>opportunity to search or scroll, but not allow them to change or
>save.  I can't use the "type" command because the files are too
>large.  Any suggestions?

>This is what I'm currently doing, but need another method.

>$myfile = $sortedarray[$input];
>$mypath = '\\\\tlrntfs1\\IT_Common\\output\\';
>$myprogram = '"C:\\Windows\\notepad.exe"';
>$mycommand = $myprogram.' "'.$mypath.$myfile ;
>system($mycommand);

You could try a Scrolled ROText widget from the Tk set of modules.

#/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::ROText;

my($mw,);
$mw = MainWindow->new(-title => 'Tk ROText example');
&gui();
&Tk::MainLoop();

exit;

sub gui
{
  my($txt1,);
  $txt1 = $mw->Scrolled('ROText', -scrollbars => 'se',)->pack();
  my $stuffToDisplay = "test\n"x50;
  $txt1->insert('1.0', $stuffToDisplay);

"tyjb" <tyj@yahoo.com> wrote in message

news:1181048720.607380.47180@g4g2000hsf.googlegroups.com...

> I'd like to display the contents of a file to users giving them the
> opportunity to search or scroll, but not allow them to change or
> save.  I can't use the "type" command because the files are too
> large.  Any suggestions?

> This is what I'm currently doing, but need another method.

> $myfile = $sortedarray[$input];
> $mypath = '\\\\tlrntfs1\\IT_Common\\output\\';
> $myprogram = '"C:\\Windows\\notepad.exe"';
> $mycommand = $myprogram.' "'.$mypath.$myfile ;
> system($mycommand);

If you can put the html tag <PRE> at the start of the text file and </PRE>
at the end of the file then you can start a browser to display the data.  I
will leave the Perl code to you.

Kevin Sproule

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc