Re: Translating Characters

2001-04-11 Thread Glenn Linderman

Guessing that "sign overstruck numbers" means that the sign of a string
of digits is embedded into the first digit, rather than consuming
an "extra" character position in fixed width fields, then there wouldn't
be a string of them, but a string might have one of them in the
first position.

Except for the "{", there is a bit-pattern relationship to these
characters, which could be converted via the use of logical bitwise
operators.  Assuming $string contains a string of digits, except the
first might be one of these sign overstruck numbers, and that "{" is
replaced by "@" to make the bit-pattern relationship consistent, then
the conversion of string to a "normal" numeric value could proceed
as follows:

   $string = '-' . chr(ord(substr($string,0,1)) ^ 0x70) . substr (
$string, 1 )
  if ord(substr($string,0,1)) >= 0x40;

With "{" in the set, there is no _simple_ conversion using logical
bitwise operators.

Note that a very similar routine (the magic of XOR) could convert it
back:

  $string = chr(ord(substr($string,1,1)) ^ 0x70) . substr ( $string, 2 )
 if substr($string,0,1) == '-';

"$Bill Luebkert" wrote:

> Dirk Bremer wrote:
> >
> > I would like to do something simple with a ^, |, or & to translate sign-overstruck 
>characters to their corresponding numeric values
> > and vice versa. For example, the sign-overstruck characters equals the following 
>numbers:
> >
> > { = -0
> > A = -1
> > B = -2
> > C = -3
> > D = -4
> > E = -5
> > F = -6
> > G = -7
> > H = -8
> > I = -9
> >
> > How can I do this with Perl's bitwise operators?
>
> I have no idea what sign-overstruck characters are.  Are these the only
> ten possible combinations?  Are they single letters or can you get a
> string of them?  The logical thing to do is use a hash to convert them.
> Or in a string of them, a RE with /eg modifiers to convert them.
>
> --
>   ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
>  (_/   /  )// //   DBE Collectibles   http://www.todbe.com/
>   / ) /--<  o // //  Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
> -/-' /___/_<_http://www.freeyellow.com/members/dbecoll/
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

--
Glenn
=
Due to the current economic situation, the light at the end of the
tunnel
will be turned off until further notice.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



versioning a core module?

2001-04-11 Thread Tom_Roche

I'd like to use Math::Big (henceforth 'Big*') for a module
I'm writing, eventually hopefully to become Math::Format. I'd like to
use this with courseware on which I work, for use with formatting
integers, floats, and scientific notation, esp wrt significant digits.

Big* are core modules since, I believe, 5.002. They are also being
rewritten: the version in 5.6.1 has major patches, and Tels is working
on even newer versions at

http://www.bloodgate.com/perl/#math

which I'd like to use, since it has useful functionality.

Unfortunately my code must run on a large university system over which
I have little control. I can usually get packages added to
.../site-perl, but I can't touch the main distribution. In fact, the 
perl which my university's IT dept "supports" is still 5.005_03 :-(
but that's another issue.

What I'd like to know is: can I diddle my code so as to ensure it
gets the newer versions of Big*, while ensuring that others continue
to access the core-shipped modules "normally"?

Specifically: suppose Joe User has

JU> use Math::BigFloat;

in his/her code. If I put Big* v1.24 in

.../site-perl/Math/

and then write code which has

TR> use Math::BigFloat 1.24;

will Joe User's code continue to work correctly? and will mine work
correctly? Or is there something else I need to do?

I suppose I could instead do something like

* copy BigFloat.pm v1.24 to .../site-perl/Math/NewBigFloat.pm

* change all references to 'Math::BigFloat' in Big* to
  'Math::NewBigFloat'

* make my code do 

TR> use Math::NewBigFloat 1.24;

but that's a little _too_ kludgey :-) I'm hoping there's a better way.
Note that, on my own workstation I have

`perl -v`
> This is perl, v5.6.0 built for MSWin32-x86

> Copyright 1987-2000, Larry Wall

and

d:/ProgramFiles/Perls/GNU/site/5.6.0/lib/Math
> total 162
> drwxrwxrwx   2 tlroche  5   0 Oct 10  2000 ..
> drwxrwxrwx   2 tlroche  5   0 Aug 19  2000 .
> -r--r--r--   1 tlroche  5   52239 Apr  7 03:25 BigInt.pm
> -r--r--r--   1 tlroche  5   27526 Apr  7 03:26 BigFloat.pm
> drwxrwxrwx   2 tlroche  5   0 Jun 17  2000 Cephes
> -r--r--r--   1 tlroche  5  111939 Apr  1  2000 Cephes.pod
> -r--r--r--   1 tlroche  52370 Apr  1  2000 Cephes.pm
> -r--r--r--   1 tlroche  5   37291 May 19  1999 Random.pm
> -r--r--r--   1 tlroche  5   13948 May 18  1999 example.pl

and I have a test driver

h:/WebAssign/testBig.pl
> use lib 'd:/ProgramFiles/Perls/GNU/site/5.6.0/lib/Math';
# use Math::BigInt;
# use Math::BigFloat;
> use Math::BigInt 1.23;
> use Math::BigFloat 1.23;

> print("\n");

When I compile, I get

> cd h:/WebAssign/
> perl -cw testBig.pl
> Math::BigInt version 1.23 required--this is only version 0.01 at
> testBig.pl line 4.
> BEGIN failed--compilation aborted at testBig.pl line 4.

> Compilation exited abnormally with code 255 at Wed Apr 11 17:12:29

I.e. perl is only seeing the core module. (Note that the core
Math::BigInt is now version 0.01 only because I copied the version
shipping with 5.6.1 into my .../5.6.0/lib/Math/: it was not versioned
before 5.6.1.

d:/ProgramFiles/Perls/GNU/5.6.0/lib/Math/BigInt.pm
> package Math::BigInt;
> $VERSION='0.01';

) Changing to

> use lib 'd:\\ProgramFiles\\Perls\\GNU\\site\\5.6.0\\lib\\Math';

makes no difference.

Compiling with -Id:/ProgramFiles/Perls/GNU/site/5.6.0/lib/Math
makes no difference:

> cd h:/WebAssign/
> perl -Id:/ProgramFiles/Perls/GNU/site/5.6.0/lib/Math -cw testBig.pl
> Math::BigInt version 1.23 required--this is only version 0.01 at
> testBig.pl line 5.
> BEGIN failed--compilation aborted at testBig.pl line 5.

> Compilation exited abnormally with code 255 at Wed Apr 11 17:22:42

Compiling with 
set PERL5LIB=d:\ProgramFiles\Perls\GNU\site\5.6.0\lib\Math
makes no difference:

> H:\WebAssign>set PERL5LIB=d:\ProgramFiles\Perls\GNU\site\5.6.0\lib\Math
> H:\WebAssign>perl -cw testBig.pl
> Math::BigInt version 1.23 required--this is only version 0.01 at
> testBig.pl line 5.
> BEGIN failed--compilation aborted at testBig.pl line 5.

Any other suggestions? Please reply directly to me as well as the
list, and TIA, [EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Translating Characters

2001-04-11 Thread $Bill Luebkert

Dirk Bremer wrote:
> 
> I would like to do something simple with a ^, |, or & to translate sign-overstruck 
>characters to their corresponding numeric values
> and vice versa. For example, the sign-overstruck characters equals the following 
>numbers:
> 
> { = -0
> A = -1
> B = -2
> C = -3
> D = -4
> E = -5
> F = -6
> G = -7
> H = -8
> I = -9
> 
> How can I do this with Perl's bitwise operators?

I have no idea what sign-overstruck characters are.  Are these the only 
ten possible combinations?  Are they single letters or can you get a 
string of them?  The logical thing to do is use a hash to convert them.
Or in a string of them, a RE with /eg modifiers to convert them.

-- 
  ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
 (_/   /  )// //   DBE Collectibles   http://www.todbe.com/
  / ) /--<  o // //  Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_http://www.freeyellow.com/members/dbecoll/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: How to determine with a shared Network Drive is connected

2001-04-11 Thread Paul Popour


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 3:01 PM
Subject: How to determine with a shared Network Drive is connected


> I have a perl script that moves files from one server to another server.
> The current script hangs,  if the network drive on the destination server
is
> down.  What is an easy way to test if the connection is up and available.
>

Try

if (-d "server\\share){print "Thank you for sharing";}else{print "Please
share with me";}


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Using OLE to do conversion of Excel books to PDF

2001-04-11 Thread Ted Zeng

This is not an advertisement.
Adobe offers an on-line scriptable Create PDF service.
You can submit a file ( Excel, Word, etc) and get
a PDF file back through the net.

It is a subscription service. I have no idea how much it costs.

Ted Zeng

Wagner-David wrote:

> I am trying to help another group within our company to convert a
> large number of Excel files to PDF.  I tried to record a macro to see the
> variables I would go through and translate into Perl. When I select from
> Menu 'Create Adobe PDF...', nothing shows up in the macro.
>
> So, how does one do something like that?  Here is the code I am
> starting with.  It loops through a directory looking at files which end in
> .xls.  Then it looks at sheets and displays all named sheets which are not
> named 'SHEETd+ where d is one or more digits'.
>
> Also trying to determine if more than one page per worksheet, since
> if multiple pages PDF will squeeze everything on to one page. (as part of
> the macro I went to preview, that is all it shows. How would one if he can,
> see the number of pages in the x of y pages)
>
> Thanks.
>
> Wags ;)
> 
> ---
>
> Code starts here:
> #!perl -ws
> #
> #
>
> use Win32::OLE qw(in);
> $progw  = $0;
> $progw  =~ s/.+[\\\/]//;
> $prog   = sprintf"%-8s: ", $progw;
>
> $diff = 0;
>
> get_time();
> printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Excel OLE St', $hour, $min,
> $sec;
>
> my $excel = Win32::OLE->GetActiveObject('Excel.Application') ||
> Win32::OLE->new('Excel.Application' , 'Quit' );
>
> get_time();
> printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Excel OLE En', $hour, $min,
> $sec;
>
> my $MyExcelFile = '';
> my $WorkingLoc  = 'd:\VK 675\100';
> chdir("$WorkingLoc") || die "Unable to change to Tariffs Directory
> $WorkingLoc: $!";
>
> get_time();
> printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Find Valid Sheets OLE St',
> $hour, $min, $sec;
>
> my $MyFileCnt = 0;
> my $MySheetCnt = 0;
>
> while ( 1 ) {
>$MyExcelFile = <*.xls>;
>last if ( ! defined $MyExcelFile );
>my $JustFile = $MyExcelFile;
>$MyFileCnt++;
>$MyExcelFile = $WorkingLoc . "\\" . $MyExcelFile;
>
>my $book = $excel->Workbooks->Open("$MyExcelFile");
>printf "File: %-s\n", $JustFile;
>my $HitSheet = '';
>foreach my $sheet (in $book->Worksheets) {
>$HitSheet = $sheet->Name if ( $HitSheet eq '' );
>next if ( $sheet->Name =~ /^Sheet\d+$/i );
>printf "  Worksheet %s\n", $sheet->Name;
>$HitSheet = 'ValidNamedSheet';
>$MySheetCnt++;
> }
>printf "  Worksheet %s\n", $HitSheet if ( $HitSheet ne 'ValidNamedSheet'
> );
>$book->Close;
>  } # looping through directory displaying active WorkSheet(s)
>
> printf "${prog}  Counts:  Files- %6d  Sheets- %6d\n", $MyFileCnt,
> $MySheetCnt;
>
> get_time();
> printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Find Valid Sheets OLE En',
> $hour, $min, $sec;
>
>  sub get_time {
> $diff = 86400 * $diff;
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time -
> $diff);
> $mon++;
> $YearModulo = $year % 100;
> $diff = 0;
>
> undef $wday;
> undef $yday;
> undef $isdst;
>
>  }  # end of get_time
>
> #
>
> Code ends here:
>
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Setting Home directories based on authenticating server.

2001-04-11 Thread Dean Theophilou

Hello:

Does anyone know how to set a user's home directory based on the server
which authenticated the user?  I know it can be done with a user's profile,
but I can't seem to find any documentation for doing the same with home
directories.  Any information would be appreciated.  Thanks.

Dean Theophilou
Genisar

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: TPJ Update

2001-04-11 Thread Christopher Hahn


Jack,

This is great news.  Thanks for letting us know.

Christopher

P.S. I believe that TPJ is about to reach a point where 
it owes us two issues at oncebut I am just glad to know
that it was not being killed.

> -Original Message-
> From: Dunnigan,Jack [Edm] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 11, 2001 12:32 PM
> To: 'Perl-list-win32'
> Subject: TPJ Update
> 
> 
> I received this message in reply to a refund request from Earthweb. I
> thought I would post it FYI.
> 
> "The Perl Journal is still in print.  EarthWeb, the parent 
> company of the
> magazine, is transferring ownership of the magazine to Jon 
> Orwant.  Please
> bear with us as we go through the transfer issues.  The 
> magazine is still up
> and running and will be managed by Jon."
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Closing Dialogs in other Applications

2001-04-11 Thread Stephen Morley

Thanks, that got some of my work done. It works great with AntiVirus to find
and close its windows. Now if only I could get it to work with Word's
popups, but they are a little more complex so I need to send a close
message. But I'm trying to get the source to see if I could add that
feature.

Stephen

-Original Message-
From: Didier Ladner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 10:19 AM
To: Stephen Morley; [EMAIL PROTECTED]
Subject: Re: Closing Dialogs in other Applications


Try to send keystrokes with
Win32::Guitest.
http://search.cpan.org/search?mode=module&query=Win32%3A%3AGuitest

The key to close a win dialog box is '~', I think.

regard

didier

Stephen Morley wrote:
> 
> Has anyone found a solutions to responding to dialogs boxes that other
> applications might open when being run from Perl (especially via ole). I'm
> trying to put something together in C++ but thought that someone may have
> been this way before?
> 
> Thanks,
> Stephen
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

-- 
Didier
--
Public Key : http://www.perltk.org/Perltk.asc
Fingerprint: 1F38 7E03 2186 5C41  676C 3B2F 2F73 E649
___

Meaning is the code's virtuality.
Didier Ladner
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: PPM problem

2001-04-11 Thread Brian McDonald

Yeah, I don't think that's it. I see no other posts to that effect... although
I have seen posts to that effect in the past.

Can there be another reason? Is it possible, as some other poster said, that my
PPM version might be out of whack?

Brian

--- "Cornish, Merrill" <[EMAIL PROTECTED]> wrote:
> The last time this happened, it was the ActiveState PPM server having
> problems.
> 
> Merrill
> 
> -Original Message-
> From: Brian McDonald [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 11, 2001 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: PPM problem
> 
> 
> Hi. I have used PPM before successfully. However, over the last couple days
> I
> have not been able to get it to work correctly. I am using ActivePerl
> 5.6.0.613
> under Win98.
> 
> The first issue is pretty basic. I type PPM at the DOS command line, get the
> PPM prompt and then type "search". I get no response -- no list of available
> packages... just a new PPM> prompt and an hourglass that takes some time to
> go
> away.
> 
> Second, as I saw with another poster (30 Mar), I get this problem too:
> 
> I said:
> ppm
> >PPM install SOAP-Lite
> 
> PPM said:
> Install package 'SOAP-Lite?' (y/N):
> 
> I said:
> y
> 
> PPM said:
> Retrieving package 'SOAP-Lite'...
> Error installing package 'SOAP-Lite': Could not locate a PPD file for
> package
> SOAP-Lite
> >PPM
> 
> Does anyone know what the problem is here?
> 
> Much obliged,
> 
> Brian
> 
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> > E-mail
> Disclaimer
> "This communication is intended solely for the addressee and is 
> confidential and not for third party unauthorized distribution."
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



net::telnet

2001-04-11 Thread John Williams



My mistake...
 
 
the line $telnet->cmd("su");should have 
been$telnet->print("su");
 
when I changed it, the waitfor command waited for 
the "Password:" prompt.
 
works fine now...  I'm just kinda new to this 
and was following an example..
 
Thanks!
 
John


Re: Help! some HTML showing in email

2001-04-11 Thread Carl Jolley

On Wed, 11 Apr 2001, byron wise wrote:

> 
> I've written a script that sends HTML email to our users.  It seems to work
> on every client I've looked at except excite.com's.  Here is the header that
> is recived from the email to excite.  Any help or suggestions on this would
> be great.  This is entirely new to me.
> 
> #
> Return-Path: <[EMAIL PROTECTED]>  
> Received: from dev.salu.com ([206.163.74.22]) by congo.excite.com (InterMail
> vM.4.01.02.00 201-229-116) with SMTP id
> <[EMAIL PROTECTED]> for
> <[EMAIL PROTECTED]>; Tue, 10 Apr 2001 16:15:59 -0700  
> Received: (qmail 9179 invoked by uid 65527); 10 Apr 2001 23:09:14 -  
> Message-ID: <[EMAIL PROTECTED]>  
> Content-Transfer-Encoding: binary  
> Content-Type: multipart/related; boundary="_--=_98694415489250"  
> MIME-Version: 1.0  
> X-Mailer: MIME::Lite 2.106 (A1.16; B2.11; Q2.03)  
> Date: Tue, 10 Apr 2001 23:09:14 UT  
> To: [EMAIL PROTECTED]  
> ###
>

Why the transfer-content-encoding: binary on the e-mail body?
For that matter I don't think you should even use binary on
the transfer-content-encoding for the attachment (if you are
using one). The HTML text is in ascii. I'm also not familiar
with Content-Type: multipart/related;

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: net::telnet

2001-04-11 Thread Ron Grabowski




  > $telnet->cmd("su");
   
  su should require a password so normal users cannot 
  arbitrarly become root.
   


Re: net::telnet

2001-04-11 Thread Ted W.

I have no familiarity with the Net::Telnet module, but I believe the SU
syntax is
actually 'SU -' to open a shell that you can log into.

TW

On Wed, 11 Apr 2001, John Williams wrote:

> I've had success with the Net::Telnet module.  But I can't get the SU
> command to work.  It times out waiting for a password.
>
> Any ideas?
>
> Thanks!
>
> John
>
> ---CODE
> #! perl remote login
> use Net::Telnet ();
> $telnet = new Net::Telnet (Timeout => 5);
>
> $telnet->open("192.134.1.23");
> $telnet->login($user, $pw);
>
> $telnet->cmd("su");
>
> #it never seems to get to this point
> $telnet->waitfor('/Password: /');
> $telnet->print("the password");
>
>
>
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: hex2ascii

2001-04-11 Thread Carl Jolley

On Wed, 11 Apr 2001, Didier Ladner wrote:

> easy:)
> 
> $string='48656C6C6F60696E60484558';
> @ascii = pack("H*",$string);
> print "@ascii";
>

The pack function yields a scalar result.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: hex2ascii

2001-04-11 Thread Carl Jolley

On Wed, 11 Apr 2001, Rogers, John wrote:

> hi all,
> 
> I've managed to get a hex string from a hardware device, via the serial
> port. Hoorah!
> (completely desperate struggle and story)
> Now I need to convert this to text. It might look abit like  
> $string='48656C6C6F60696E60484558'; #( equals 'Hello in HEX')
> 
> two questions ;
> 1) Is  creating a hash and looking up the values the only way to do this in
> perl ?
>   is there a better way? I cant seem to find one. a module ?
>   I run into trouble with extended/control chars
> 
> 
> 2) How can I split such a string into bytes eg two character groups  eg 48
> 65 6C etc
> 

> 1) Is  creating a hash and looking up the values the only way to do this in
> perl ?

Exactly what do you mean by "this"? If you are talking about converting
between bytes and their hexadecimal character representaion the answer
is no. To insert a space after every two characters, you might try
a substitute operation: $hexstring=~s/(..)/$1 /g;

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Using OLE to do conversion of Excel books to PDF

2001-04-11 Thread Cameron Dorey

Wagner-David wrote:
> 
> I am trying to help another group within our company to convert a
> large number of Excel files to PDF.  I tried to record a macro to see the
> variables I would go through and translate into Perl. When I select from
> Menu 'Create Adobe PDF...', nothing shows up in the macro.

Well, then don't "Create Adobe PDF." Use the Print menu and use the
Adobe driver as your active printer. From M$Word, using Acrobat
PDFWriter as the Active Printer, this works for me:

$app->{'ActivePrinter'} = 'Acrobat PDFWriter';

$app->Application->PrintOut({
FileName=>"",
Background => 0,
Append => 0,
Range  => wdPrintAllDocument,
Item   => wdPrintDocumentContent,
Copies  => 1,
PageType   => wdPrintAllPages,
PrintToFile => 0
});

Translating the print statement to the analogous Excel variables should
work OK, just record your macro as before, but print instead of "CAP".

> Also trying to determine if more than one page per worksheet, since
> if multiple pages PDF will squeeze everything on to one page. (as part of
> the macro I went to preview, that is all it shows. How would one if he can,
> see the number of pages in the x of y pages)

Sorry, can't help you there.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
[EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



net::telnet

2001-04-11 Thread John Williams



I've had success with the Net::Telnet module.  But I can't get the 
SUcommand to work.  It times out waiting for a password.Any 
ideas?Thanks!John---CODE#! perl remote 
loginuse Net::Telnet ();$telnet = new Net::Telnet (Timeout => 
5);$telnet->open("192.134.1.23");$telnet->login($user, 
$pw);$telnet->cmd("su");#it never seems to get to this 
point$telnet->waitfor('/Password: /');$telnet->print("the 
password");


RE: PPM problem

2001-04-11 Thread Cornish, Merrill

The last time this happened, it was the ActiveState PPM server having
problems.

Merrill

-Original Message-
From: Brian McDonald [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 2:04 PM
To: [EMAIL PROTECTED]
Subject: PPM problem


Hi. I have used PPM before successfully. However, over the last couple days
I
have not been able to get it to work correctly. I am using ActivePerl
5.6.0.613
under Win98.

The first issue is pretty basic. I type PPM at the DOS command line, get the
PPM prompt and then type "search". I get no response -- no list of available
packages... just a new PPM> prompt and an hourglass that takes some time to
go
away.

Second, as I saw with another poster (30 Mar), I get this problem too:

I said:
ppm
>PPM install SOAP-Lite

PPM said:
Install package 'SOAP-Lite?' (y/N):

I said:
y

PPM said:
Retrieving package 'SOAP-Lite'...
Error installing package 'SOAP-Lite': Could not locate a PPD file for
package
SOAP-Lite
>PPM

Does anyone know what the problem is here?

Much obliged,

Brian

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


E-mail 
Disclaimer
"This communication is intended solely for the addressee and is 
confidential and not for third party unauthorized distribution."



Help! some HTML showing in email

2001-04-11 Thread byron wise


I've written a script that sends HTML email to our users.  It seems to work
on every client I've looked at except excite.com's.  Here is the header that
is recived from the email to excite.  Any help or suggestions on this would
be great.  This is entirely new to me.

#
Return-Path: <[EMAIL PROTECTED]>  
Received: from dev.salu.com ([206.163.74.22]) by congo.excite.com (InterMail
vM.4.01.02.00 201-229-116) with SMTP id
<[EMAIL PROTECTED]> for
<[EMAIL PROTECTED]>; Tue, 10 Apr 2001 16:15:59 -0700  
Received: (qmail 9179 invoked by uid 65527); 10 Apr 2001 23:09:14 -  
Message-ID: <[EMAIL PROTECTED]>  
Content-Transfer-Encoding: binary  
Content-Type: multipart/related; boundary="_--=_98694415489250"  
MIME-Version: 1.0  
X-Mailer: MIME::Lite 2.106 (A1.16; B2.11; Q2.03)  
Date: Tue, 10 Apr 2001 23:09:14 UT  
To: [EMAIL PROTECTED]  
###

byron wise



"When you sell a man a book, you don't sell him 12 ounces of paper and ink
and glue - you sell him a whole new life." - Christopher Morley

"Thanks O'REILLY." - Me





___
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



TPJ Update

2001-04-11 Thread Dunnigan,Jack [Edm]

I received this message in reply to a refund request from Earthweb. I
thought I would post it FYI.

"The Perl Journal is still in print.  EarthWeb, the parent company of the
magazine, is transferring ownership of the magazine to Jon Orwant.  Please
bear with us as we go through the transfer issues.  The magazine is still up
and running and will be managed by Jon."

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Using OLE to do conversion of Excel books to PDF

2001-04-11 Thread Wagner-David

I am trying to help another group within our company to convert a
large number of Excel files to PDF.  I tried to record a macro to see the
variables I would go through and translate into Perl. When I select from
Menu 'Create Adobe PDF...', nothing shows up in the macro.

So, how does one do something like that?  Here is the code I am
starting with.  It loops through a directory looking at files which end in
.xls.  Then it looks at sheets and displays all named sheets which are not
named 'SHEETd+ where d is one or more digits'.

Also trying to determine if more than one page per worksheet, since
if multiple pages PDF will squeeze everything on to one page. (as part of
the macro I went to preview, that is all it shows. How would one if he can,
see the number of pages in the x of y pages)

Thanks.

Wags ;)

---

Code starts here:
#!perl -ws
#
#

use Win32::OLE qw(in);
$progw  = $0;
$progw  =~ s/.+[\\\/]//;
$prog   = sprintf"%-8s: ", $progw;

$diff = 0;

get_time();
printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Excel OLE St', $hour, $min,
$sec;

my $excel = Win32::OLE->GetActiveObject('Excel.Application') ||
Win32::OLE->new('Excel.Application' , 'Quit' );

get_time();
printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Excel OLE En', $hour, $min,
$sec;

my $MyExcelFile = '';
my $WorkingLoc  = 'd:\VK 675\100';
chdir("$WorkingLoc") || die "Unable to change to Tariffs Directory
$WorkingLoc: $!";

get_time();
printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Find Valid Sheets OLE St',
$hour, $min, $sec;

my $MyFileCnt = 0;
my $MySheetCnt = 0;

while ( 1 ) {   
   $MyExcelFile = <*.xls>;
   last if ( ! defined $MyExcelFile );
   my $JustFile = $MyExcelFile;
   $MyFileCnt++;   
   $MyExcelFile = $WorkingLoc . "\\" . $MyExcelFile;
   
   my $book = $excel->Workbooks->Open("$MyExcelFile");
   printf "File: %-s\n", $JustFile;
   my $HitSheet = '';
   foreach my $sheet (in $book->Worksheets) {
   $HitSheet = $sheet->Name if ( $HitSheet eq '' );
   next if ( $sheet->Name =~ /^Sheet\d+$/i );
   printf "  Worksheet %s\n", $sheet->Name;
   $HitSheet = 'ValidNamedSheet';
   $MySheetCnt++;
}
   printf "  Worksheet %s\n", $HitSheet if ( $HitSheet ne 'ValidNamedSheet'
);
   $book->Close;
 } # looping through directory displaying active WorkSheet(s)

printf "${prog}  Counts:  Files- %6d  Sheets- %6d\n", $MyFileCnt,
$MySheetCnt;

get_time();
printf "${prog}  %-20s: %02d:%02d:%02d\n", 'Find Valid Sheets OLE En',
$hour, $min, $sec;

 sub get_time {
$diff = 86400 * $diff;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time -
$diff);
$mon++;
$YearModulo = $year % 100;
$diff = 0;

undef $wday;
undef $yday;
undef $isdst;

 }  # end of get_time

#



Code ends here:


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



PPM problem

2001-04-11 Thread Brian McDonald

Hi. I have used PPM before successfully. However, over the last couple days I
have not been able to get it to work correctly. I am using ActivePerl 5.6.0.613
under Win98.

The first issue is pretty basic. I type PPM at the DOS command line, get the
PPM prompt and then type "search". I get no response -- no list of available
packages... just a new PPM> prompt and an hourglass that takes some time to go
away.

Second, as I saw with another poster (30 Mar), I get this problem too:

I said:
ppm
>PPM install SOAP-Lite

PPM said:
Install package 'SOAP-Lite?' (y/N):

I said:
y

PPM said:
Retrieving package 'SOAP-Lite'...
Error installing package 'SOAP-Lite': Could not locate a PPD file for package
SOAP-Lite
>PPM

Does anyone know what the problem is here?

Much obliged,

Brian

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



How to determine with a shared Network Drive is connected

2001-04-11 Thread bb

I have a perl script that moves files from one server to another server.
The current script hangs,  if the network drive on the destination server is
down.  What is an easy way to test if the connection is up and available. 

Bill Bryan
EDM International
915-225-2526 Voice
915-225-2600 Fax
e-mail [EMAIL PROTECTED]
e-mail [EMAIL PROTECTED] (home)

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: malformed header from script error

2001-04-11 Thread Thomas_M

> print "HTTP/1.0 200 Okay\n";
> #print "Content-Type: multipart/x-mixed-replace;boundary=myboundary\n\n";
> print "--myboundary\n";

You forgot to comment out the above line. That should fix it.

-- 
Mark Thomas[EMAIL PROTECTED]
Sr. Internet Architect User Technology Associates, Inc.

$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Translating Characters

2001-04-11 Thread Dirk Bremer

I would like to do something simple with a ^, |, or & to translate sign-overstruck 
characters to their corresponding numeric values
and vice versa. For example, the sign-overstruck characters equals the following 
numbers:

{ = -0
A = -1
B = -2
C = -3
D = -4
E = -5
F = -6
G = -7
H = -8
I = -9

How can I do this with Perl's bitwise operators?

Dirk Bremer - Systems Programmer II - AMS Department - NISC
636-922-9158 ext. 652 fax 636-447-4471




___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users