Re: Question regarding printing from IE via OLE (followup to prev ious question?)

2001-10-10 Thread Mark G. Franz

You need to print each page in a site?  Other than loading each page inn the
browser and hitting "print", I don't know if there is a way to capture each
page in the background... remember, the browser is going to control the
layout and the display, no to mention the contents...

Never mind ensuring that each and every page link is printed correctly.

- Original Message -
From: "Carl Jolley" <[EMAIL PROTECTED]>
To: "Morse, Richard E" <[EMAIL PROTECTED]>
Cc: "'Mark G. Franz'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: 10 October, 2001 10:49 AM
Subject: RE: Question regarding printing from IE via OLE (followup to prev
ious question?)


> > Here's what I'm trying to do:
> > The place that I work maintains a web site for a different department.
The
> > head of this other department refuses to use a computer, but still
insists
> > on reviewing the site before it is put online.  Hence, I need to take an
> > entire web site and print it out.  I was unsuccessful in finding a
program
> > already written to do this, so I've written a Perl script to take in the
> > root of a website (on a local drive -- so I can use the distinction
between
> > file:// and http:// urls to determine whether or not to follow the link)
and
> > make a list of all files reachable from that page.  I then want to
script a
> > web-browser to open these files and print them.  I could do this in
under 5
> > minutes on MacOS (using AppleEvents), but I'm not having any luck in
getting
> > it to work on Windows.  I don't want to alter the webpages in any way,
> > otherwise I would do what you suggest...
> >
>
> Since this person refuses to use a computer, they can never know for
> sure what's on the web site. I suggest you get them a subscription
> to NewsWeek and tell them that's the web site.
>
>  [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: Question regarding printing from IE via OLE (followup to previous question?)

2001-10-10 Thread Carl Jolley

> Here's what I'm trying to do:
> The place that I work maintains a web site for a different department.  The
> head of this other department refuses to use a computer, but still insists
> on reviewing the site before it is put online.  Hence, I need to take an
> entire web site and print it out.  I was unsuccessful in finding a program
> already written to do this, so I've written a Perl script to take in the
> root of a website (on a local drive -- so I can use the distinction between
> file:// and http:// urls to determine whether or not to follow the link) and
> make a list of all files reachable from that page.  I then want to script a
> web-browser to open these files and print them.  I could do this in under 5
> minutes on MacOS (using AppleEvents), but I'm not having any luck in getting
> it to work on Windows.  I don't want to alter the webpages in any way,
> otherwise I would do what you suggest...
>

Since this person refuses to use a computer, they can never know for
sure what's on the web site. I suggest you get them a subscription
to NewsWeek and tell them that's the web site.

 [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: Question regarding printing from IE via OLE (followup to previous question?)

2001-10-10 Thread Carl Jolley

On Wed, 10 Oct 2001, Stephen Patterson wrote:

> On Tuesday 09 October 2001 8:29 pm, Morse, Richard E wrote:
> > In a message on 5 Apr 2001, Ron Wantock [email unknown] wrote:
> > >I'm trying to load a web page into Internet Explorer and then
> > >print it via perl and Win32::OLE. After a lot of stumbling
> > >around, I finally figured out how to do it. Here's what I came
> > >up with.
> > >
> > >$ieApp = Win32::OLE->new(
> > > 'InternetExplorer.Application',
> > > sub {$_[0]->Quit;} );
> > >$ieApp->Navigate('http://www.activestate.com/');
> > >$ieApp->ExecWB(6, 2);
> > >
> > >This works, but if the script ends to quickly, the destructor
> > >kills the IE application before the print can execute. To prevent
> > >this, I've added a 'sleep' statement, but that seems rather clumsy
> > >to me. Is there any way to determine when the IE app is done
> > >printing via OLE? Perhaps with an event?
> > >Thanks
> > >wantor
> >
> > I'm brand new to using Perl to control applications on Win32 (up to now,
> > I've only used AppleEvents on Macs to do IPC, or piping via STDIN and
> > STDOUT on *nix machines, but my new job requires Windows, for now), and my
> > question is, where did you get the constants that you fed into the ExecWB
> > command? I've tried this script, and it doesn't work -- it doesn't print
> > anything. Even when I stop it from quitting, it won't print.  The two
> > followup messages I found on the web archive of the list didn't seem to
> > help -- the Microsoft documentation 1) suggests that the first number
> > should be 27, and 2) gives me a 404 error when I try to get more
> > information on where OLECMDEXECOPT_DONTPROMPTUSER is defined.  When I try
> > to execute the command
> >
> > with either 6 or 27 in the first parameter, I get the error:
> > >Win32::OLE(0.1501) error 0x80040100: "Trying to revoke a drop target that
> >
> > has
> >
> > >not been registered"
> > >in METHOD/PROPERTYGET "ExecWB" at test_ole.pl line 11
> >
> > Which doesn't seem to be a sensible error message involving printing...
> >
> > Thanks for any help that you can give,
> > Ricky Morse
>
> I've never used IE for printing, but I have occasionally used word (ver 2000)
> to print HTML files with tht following sub:
> sub print_word {
> my $wordfile = $_[0];
> my $word = Win32::OLE->new('Word.Application', 'Quit') || die
>   "Unable to start word";
> my $document = $word->Documents->Open($wordfile) || die
>   "Cannot open document";
> # enable print in foreground
> $word->Options->PrintBackground('False');
> $document->PrintOut;
> $word->Quit;
> }
>


I doubt that the statement:

$word->Options->PrintBackground('False');

will function as you apparently intend.

 [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



XCopy

2001-10-10 Thread Jones Robert Contr 81 CS/SCK



 Is there a way in Perl on a Windows NT system to copy a directory, it's
files, and sub-directories and files efficiently ??

 I noticed the rmtree() command in File::find and, based on that,
figured there was a comparable command for recursively copying a directory.
A few websearches and reference books yielded no notable answers.  I know
one can program through this and make your own recursive 'xcopy'ish command,
but it seems so obvious that this would already be done and incorporated
into Perl already.



Robert E. Jones, BSCS, BSP
81 CS/SCK, Keesler AFB
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Accessing the windows print spooler API

2001-10-10 Thread Joseph P. Discenza

Stephen Patterson wrote, on Wednesday, October 10, 2001 10:54 AM
: I've got some hairy looking C code from microsoft
: (http://support.microsoft.com/kb/articles/Q158/8/28.ASP) which gives an
: example of loading print queue information into a set of arrays,
: and which
: I'd like to convert to perl. This runs OpenPrinter to create a
: printer handle
: and then EnumJobs to ge a dump of the queue.
:
: OpenPrinter(szPrinterName, &hPrinter, NULL);
:
: EnumJobs(hPrinter, 0, 0x, 1, (LPBYTE)pJobInfo, dwNeeded,
: &dwNeeded,
: &dwReturned);
:
: My thinking is that to do this in perl, I should open a printer
: handle with
: Win32::OLE and then call enumjobs on the handle: e.g.

Actually, it sounds more like you want Win32::API than ::OLE.

>From the doc:

  use Win32::API;
  $function = new Win32::API($library,
 $functionname,
 \@argumenttypes,
 $returntype);
  $return = $function->Call(@arguments);

The example built up in the doc is this:

  $GetTempPath = new Win32::API("kernel32", "GetTempPath", [N, P], N);
  $lpBuffer = " " x 80;
  $return = $GetTempPath->Call(80, $lpBuffer);
  # since GetTempPath returns the length
  $TempPath = substr($lpBuffer, 0, $return);
  # otherwise you could use index & substr to get rid of everything
  # after the null

You'll have to do some hunting through the Win32 SDK Reference; look
for it on the Microsoft's WWW site. If you own Visual C++, searching
in the include files is much faster. Or if you have VB, the APIViewer,
but then you have to translate back to C from VB.

API Viewer gives me:

Public Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA"
(ByVal pPrinterName As String, phPrinter As Long, pDefault As
PRINTER_DEFAULTS) As Long

so I probably want
  $OpenPrinter = new Win32:API("winspool.drv", "OpenPrinter", [P, P, P], N);
  $pPrinterDefaults = #something!!
  $HRESULT = $OpenPrinter->Call("myprinter", $phPrinter, $pPrinterDefaults);

where that something is a packed structure. You'll need to know the
C structure layout for the PRINTER_DEFAULTS, and then follow the doc:

Another note: to pass a pointer to a structure in C, you'll have to pack()
the required elements in a variable. And of course, to access the values
stored in a structure, unpack() it as required. An example of how it works:
we have the POINT structure defined in C as:

typedef struct {
LONG  x;
LONG  y;
} POINT;
Thus, to call a function that uses a POINT structure you will need the
following lines:

$GetCursorPos = new Win32::API("user32", "GetCursorPos", [P], V);


$lpPoint = pack("LL", 0, 0); # store two LONGs
$GetCursorPos->Call($lpPoint);
($x, $y) = unpack("LL", $lpPoint); # get the actual values


Good luck!

Joe

==
  Joseph P. Discenza, Sr. Programmer/Analyst
   mailto:[EMAIL PROTECTED]

  Carleton Inc.   http://www.carletoninc.com
  219.243.6040 ext. 300fax: 219.243.6060

Providing Financial Solutions and Compliance for over 30 Years


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



RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Thomas_M

Jeffrey [mailto:[EMAIL PROTECTED]] wrote:
> 
> Another method is to specify different delimiters for
> the match.  This avoids LTS (leaning toothpick
> syndrome):
> 
> m#^/bootp/linux/#;
> m%^/bootp/linux/%;
> m(^/bootp/linux/);
> 
> Each of the lines above are equivalent -- they're also
> equivalent to /^\/bootp\/linux\//;

No one mentioned this: /^\Q/bootp/linux/\E/; 

also equivalent, but has an advantage when doing things like this:

$skipdir = '/bootp/linux/';
while () {
next if /^\Q$skipdir\E/;
...
}

-- 
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



RE: Accessing the windows print spooler API

2001-10-10 Thread Tillman, James

> OpenPrinter(szPrinterName, &hPrinter, NULL);

This is a Win32 API call, not an OLE object method.
 
> EnumJobs(hPrinter, 0, 0x, 1, (LPBYTE)pJobInfo, 
> dwNeeded, &dwNeeded, 
> &dwReturned);

Same here.
 
> My thinking is that to do this in perl, I should open a 
> printer handle with 
> Win32::OLE and then call enumjobs on the handle: e.g.
> 
> use WIn32::OLE;
> 
> $ole = new 
> Win32::OLE('{2227A280-3AEA-1069-A2DE-08002B30309D}') || die 
> Win32::OLE->LastError;
> 
> (where the hex number is the CLS_ID of the Printers object) 
> but this code 
> dies with Win32::OLE(0.1101) error 0x80004002: "No such 
> interface supported" 
> at test.pl line 3.

> Can anyone give me some pointers on this, my windows specific 
> perl coding 
> skills are next to nonexistent.
> 
> PS. I know about ADSI, but I want to use something that I can 
> test against 
> and that doesn't need anything other than perl and a standard 
> windows build.

That being the case, some other alternatives you can use are to try using
Aldo Calpini's Win32::API to make the API calls, but that can get a little
hairy as well, unless you're intimate with perl's pack and unpack features
and how to use them to create C-compatible structs.

Beyond that, your best best is XS (the standard perl to C wrapper) or SWIG,
which is another perl/c solution.

I personally don't think this can be done with just straight Perl and a
standard windows installation.  Doing anything with the Win32 API from Perl
is impossible as far as I know without using Win32::API or perl/c glue code
like XS or SWIG.

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



Perl-ASP related question

2001-10-10 Thread Hugo Escobar



Hi all:
 
Excuse me if this question has been answered 
before:
 
Does anyone know a way/scripts/tools to translate 
(at least help to translate) MS-ASP-VBScript code to Perl?
 
I know about commercial products like ChiliSoft but 
I'm looking for something in the open source world.
 
Any help will be highly appreciated!
 
Hugo Escobar


RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Jeffrey

Another method is to specify different delimiters for
the match.  This avoids LTS (leaning toothpick
syndrome):

m#^/bootp/linux/#;
m%^/bootp/linux/%;
m(^/bootp/linux/);

Each of the lines above are equivalent -- they're also
equivalent to /^\/bootp\/linux\//;


--- "Vroom, Tim" <[EMAIL PROTECTED]> wrote:
> you need to escape all of the /'s in your path with
> in
> the match
> 
> /^\/bootp\/linux\//;


=

Jeffrey
[EMAIL PROTECTED]

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Jeffrey


--- "Vroom, Tim" <[EMAIL PROTECTED]> wrote:
> you need to escape all of the /'s in your path with
> in
> the match
> 
> /^\/bootp\/linux\//;
> 
> should match;
> 
> a good technique for building regular expressions is
> to
> match a small portion of what you're looking for. 
> then
> after you get that part working continue adding to
> your
> regular expression, if that doesn't match you know
> something
> you just added was faulty.
> 
> -Original Message-
> From: Jorge Goncalvez
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 10, 2001 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PBML] Re: Regular expression needed
> 
> 
> 
> 
> 
> 
> 
> Hi, I have a file with several lines which begins
> with:
> /bootp/linux/
> 
> I would like to match theses lines
> 
> I tried this  while () {
> chomp();
> /^\/bootp/linux/\/
> 
> but it doesn't work how can I do ?
> 
> Thanks.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
>
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> 


=

Jeffrey
[EMAIL PROTECTED]

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Translate a Shell Script > Perl Script

2001-10-10 Thread Peter Eisengrein

Welcome to our little family. You'll find that at times we can be a grumpy
sort but that most are happy to help. However, we'd usually rather to "teach
you to fish and feed you for life" rather than to simply "give you a fish
and feed you for a day." With that in mind, here are many of the function
equivilents for you to look into and you can work out the details.

-Pete

P.S. O'Reilly's Learning Perl (Llama book) is also an excellent place to
start.


foreach or for & glob
> for i in *.txt


split
> cut -d"," -f2,3 $i > $i.cut


s///g;
> # Substitute '^,' by 'NaN,"
> sed -e 's/^,/NaN,/g' -e 's/NaN,$/NaN,NaN/g' $i.cut > $i.nan
> # Subtitute ',' by 'Tab(\t)'
> sed -e 's/,/ /g' $i.nan > $i.tab


rename
> # Rename files
> mv $i.tab $i.asc



unlink
> # Delete temporary files
> rm *.cut
> rm *.nan


readdir
> ls *.asc *.txt


you'll have to write a subroutine for wc where you'll open each file, split
each line and count the words.
> wc -l *.asc
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Accessing the windows print spooler API

2001-10-10 Thread Stephen Patterson

I've got some hairy looking C code from microsoft 
(http://support.microsoft.com/kb/articles/Q158/8/28.ASP) which gives an 
example of loading print queue information into a set of arrays, and which 
I'd like to convert to perl. This runs OpenPrinter to create a printer handle 
and then EnumJobs to ge a dump of the queue.

OpenPrinter(szPrinterName, &hPrinter, NULL);

EnumJobs(hPrinter, 0, 0x, 1, (LPBYTE)pJobInfo, dwNeeded, &dwNeeded, 
&dwReturned);

My thinking is that to do this in perl, I should open a printer handle with 
Win32::OLE and then call enumjobs on the handle: e.g.

use WIn32::OLE;

$ole = new Win32::OLE('{2227A280-3AEA-1069-A2DE-08002B30309D}') || die 
Win32::OLE->LastError;

(where the hex number is the CLS_ID of the Printers object) but this code 
dies with Win32::OLE(0.1101) error 0x80004002: "No such interface supported" 
at test.pl line 3.

Can anyone give me some pointers on this, my windows specific perl coding 
skills are next to nonexistent.

PS. I know about ADSI, but I want to use something that I can test against 
and that doesn't need anything other than perl and a standard windows build.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Tillman, James

> Hi, I have a file with several lines which begins with:
> /bootp/linux/
> 
> I would like to match theses lines
> 
> I tried this  while () {
> chomp();
> /^\/bootp/linux/\/
> 
> but it doesn't work how can I do ?
> 

Um.  Something tells me you didn't cut and paste the original code, or if
you did, you probably didn't get a runnable script yet.  Am I right?

If you provide something more akin to your original code, or even better,
cut and paste it, it would be helpful to identify what you're really trying
to do.

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



RE: Exchange Server Log Files

2001-10-10 Thread Ken Cornetet
Title: RE: Exchange Server Log Files





Are you talking about Exchange 5.5? If so, the logs you are looking for are in the "tracking.log" share of your IMS server(s).

The log files are created one per day, and are tab delimited.


The log file names, and log timestamps are in GMT, so be careful!


Each entry consists of one or more lines followed by a blank line.


Here's a code snippet to parse the initial line of each entry:


    ($msgid, $eventnum, $timestamp, $gateway, $partner,
 $remoteid, $originator, $priority, $length,
 $dummy1, $dummy2, $dummy3, $nrecip) = split /\t/;


Then you need to read $nrecip lines (one for each recipient). Then read the blank line. Ie:


    for ($i = 0 ; $i < $nrecip ; $i++ ) {
    ($recip, $dummy4) = split /[\t\n]/, <>;
    }
    <>


I don't remember what the fields that i've parsed into various "$dummy" variables were used for - something I didn't need.

See http://support.microsoft.com/support/kb/articles/q173/3/64.asp for event number definitions.


-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 10, 2001 9:07 AM
To: [EMAIL PROTECTED]
Subject: OT: Exchange Server Log Files




This is Off Topic...


My Exchange Server manuals don't contain any reference to a Log file
containing records for Emails that were relayed.  I have need to verify
whether certain emails I am sending via an app I wrote are actually relaying
though the server.


Can anyone point me to a log file containing this information?


Thanks,


Adam Frielink


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





Translate a Shell Script > Perl Script

2001-10-10 Thread Laurent Zudaire

Hello guys

I'm a new user of Perl (win32).
To date I used an UNIX environment for Windows (CYGWIN) to perform under
windows a pre-processing of wind data files with the following shell script
Could you help me to translate this shell script into a Perl script.
Now I'm just buying O'Reilly "Programming Perl" :>)

Help would be appreciated

--
for i in *.txt
# Separate columns
do
cut -d"," -f2,3 $i > $i.cut
# Substitute '^,' by 'NaN,"
sed -e 's/^,/NaN,/g' -e 's/NaN,$/NaN,NaN/g' $i.cut > $i.nan
# Subtitute ',' by 'Tab(\t)'
sed -e 's/,/ /g' $i.nan > $i.tab
# Rename files
mv $i.tab $i.asc
done
# Delete temporary files
rm *.cut
rm *.nan
# Replace (.txt.asc) extension by (.asc) extension
for i in *.txt.asc
do
mv $i `basename $i .txt.asc`.asc
done
ls *.asc *.txt
wc -l *.asc


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



OT: Exchange Server Log Files

2001-10-10 Thread Adam Frielink

This is Off Topic...

My Exchange Server manuals don't contain any reference to a Log file
containing records for Emails that were relayed.  I have need to verify
whether certain emails I am sending via an app I wrote are actually relaying
though the server.

Can anyone point me to a log file containing this information?

Thanks,

Adam Frielink

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



RE: Editing word documents

2001-10-10 Thread Charbeneau, Chuck

> From: Christopher Hahn [mailto:[EMAIL PROTECTED]]
> Subject: RE: Editing word documents

> I wanted to ask again whether anyone had found a useful
> *book* that deals with OLE from perl.  MS's MSDN site seems
> designed so as to spread the info out to such an extent that
> I do not see the big picture when browsing there.


"Windows NT WIN32 Perl Programming: The Standard Extensions" by Dave Roth 
ISBN: 1578700671

More info on Dave and what he does and has written:  http://www.roth.net/

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



RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Vroom, Tim
Title: RE: [PBML] Re: Regular expression needed





you need to escape all of the /'s in your path with in
the match


/^\/bootp\/linux\//;


should match;


a good technique for building regular expressions is to
match a small portion of what you're looking for.  then
after you get that part working continue adding to your
regular expression, if that doesn't match you know something
you just added was faulty.


-Original Message-
From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 10, 2001 9:41 AM
To: [EMAIL PROTECTED]
Subject: [PBML] Re: Regular expression needed








Hi, I have a file with several lines which begins with:
/bootp/linux/


I would like to match theses lines


I tried this  while () {
    chomp();
    /^\/bootp/linux/\/


but it doesn't work how can I do ?


Thanks.












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





[PBML] Re: Regular expression needed

2001-10-10 Thread Jorge Goncalvez






Hi, I have a file with several lines which begins with:
/bootp/linux/

I would like to match theses lines

I tried this  while () {
chomp();
/^\/bootp/linux/\/

but it doesn't work how can I do ?

Thanks.











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



RE: Question regarding printing from IE via OLE (followup to previous question?)

2001-10-10 Thread Morse, Richard E

Hi!  Thanks for the suggestion, but I still don't get prompted to print, nor
does it print on its own -- although I no longer get the errors

I'm running this on Win95, with IE 5.5 -- does that require different constants?

Thanks,
Ricky

> -Original Message-
> From: Sisyphus [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, October 10, 2001 4:55 AM
> To:   [EMAIL PROTECTED]
> Subject:  Re: Question regarding printing from IE via OLE (followup to
> previous question?)
> 
> 
> - Original Message -
> From: "Morse, Richard E" <[EMAIL PROTECTED]>
> 
> > >$ieApp = Win32::OLE->new(
> > > 'InternetExplorer.Application',
> > > sub {$_[0]->Quit;} );
> > >$ieApp->Navigate('http://www.activestate.com/');
> sleep 10; # eliminates "Trying to revoke" error, for me.
> > >$ieApp->ExecWB(6, 2);
> >
> 
> That change may be all that is required. I don't have a printer attached to
> this machine, but when I run the script with the above change I get a popup
> asking me whether I want to fax or print - and telling me to install the
> printer if I wish to print.
> 
> Hope there's something helpful in that.
> 
> Cheers,
> Rob
> 
> ___
> 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: Perl/Tk book

2001-10-10 Thread Will Ganz

The Advanced Perl Programming book for OReilly also has a good section on
Tk. In some people's opnion, it is better than the Perl/Tk book from the
same publisher. I have both and agree with their assessment.

If you have ever done anything with a Java GUI program, then you will notice
that the layout tools Tk are quite similar. If this is the case for you,
then The Advanced Perl Programming book might be a better buy for you. As
always, YMMV.

HTH,

Will

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Christopher Hahn
> Sent: Tuesday, October 09, 2001 10:14 PM
> To: Perl win32 email list (E-mail)
> Subject: Perl/Tk book
>
>
>
> Hello all,
>
> I was browsing around and noticed a Manning Publications
> book on Perl/Tk (ISBN=1884777937).
>
> But when I went to a good bookstore I found that it's
> publication had been cancelled:
>   http://www.booksmatter.com/book.asp?isbn=1884777937&cp=0
>
> Does anyone know why?  ...or whether this title might be
> published by some other house?
>
> Just curious.  There isn't really a good Perl/Tk book out
> there. (Sorry to admit it, but the Oreilly Perl/Tk book is
> probably the only one from them that I do not like)
>
> Take care,
>
> Christopher
>
> P.S. On the issue of the Perl + OLE + Office Automation
> that I poked around about earlier.  I wanted to report that
> there is a tool which will report on the methods and properties
> of an automation server, if it provides typelib information.
> It is called "OLEVW32.EXE".  I am still wanting to find a good
> book on the subject though
>
> --
> In our sleep, pain which cannot forget falls drop by
> drop upon the heart until, in our own despair, against
> our will, comes wisdom through the awful grace of God.
> Christopher Hahn: [EMAIL PROTECTED]
> ___
> 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: trying to access nt-variables to include it in html

2001-10-10 Thread Tillman, James

> Just use $ENV{username} within your script.

More than likely this will not work with a default CGI configuration because
the web server runs as a user called IUSR_COMPUTERNAME (usually).  Also, I
think the username env variable is masked from the %ENV, anyway.  What you
really need to do if you're serving these pages over the local intranet is
to turn off anonymous authentication on your web and give all users access
to the files you're serving on the filesystem (they don't need logon rights
or a network share, just access to the CGIs and to the Perl installation
directory).  

By turning off anonymous authentication, you'll be forcing the user's
browser to forward their logon credentials to the web server in order to
access the files.  This will cause the LOGON_USER env variable to be set to
their logon name, and that's the one you should try to get access to.  I
know of only 2 methods of getting the logon name without setting your server
up this way, and neither is very pretty, so unless you need to serve
anonymously as well as to authenticated users, I'd recommend the previous
solution.

If you end up with permissions problems, which are inevitable with IIS and
such configurations, turn on auditing on the server for the entire
filesystem AND the registry, and then monitor the Event Logs for access
errors.  These should point you to the files the users need permissions for.

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



RE: Perl/Tk book

2001-10-10 Thread Tillman, James

> P.S. On the issue of the Perl + OLE + Office Automation
> that I poked around about earlier.  I wanted to report that
> there is a tool which will report on the methods and properties
> of an automation server, if it provides typelib information.
> It is called "OLEVW32.EXE".  I am still wanting to find a good
> book on the subject though

There's another one called XRay which provides much more readable output,
similar to VB's Object Browser, and can even save the information to a
formatted text file.  I forget where I picked it up (for some reason I'm
thinking the Crystal Reports web site for some crazy reason), but it was
freely available.  A search on Google would certainly turn it up.

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



RE: TPJ?

2001-10-10 Thread Tillman, James

> One nice thing Sys Admin mag has done is release an archive 
> of all the TPJ
> issues:
> 
> 
> 

That just means they're maintaining the status quo, since EarthWeb (the
previous owner) already had that.  Unless it's free to the public now, in
which case, they've added something that wasn't there before.

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



Re: trying to access nt-variables to include it in html

2001-10-10 Thread Simon Oliver

Just use $ENV{username} within your script.

--
  Simon Oliver

Björn Göhringer wrote:
> 
> we want to include the environment variable "username" in an html page
> so we can start different actions depending on which user is logged in
> and accesses the page. so when i go to the command line and execute the
> command
> 
> c:\> perl -e "system(\"set > variables.txt\")";
> 
> i get a list of all the nt variables in the file "variables.txt"
> including username (USERNAME=administrator, for example). now i made a
> script which should create an html page and include the variable:
> 
> print "...blablabla";
> ...
> system("set > variables.txt");
> $file = "variables.txt";
> open FILE, $file;
> while () {
> if ($_ =~ /USERNAME=(.+)/) {
> $username = $1;
> }
> }
> print $username;
> ...
> 
> when i call this script in the browser, i get a list of all the
> WEBSERVER variables in the file, which do NOT include username! how can
> i access this variable from the script???
> thanks in advance,
> björn
> 
> ___
> 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: trying to access nt-variables to include it in html

2001-10-10 Thread Björn Göhringer

i thought that too, but in that array there seem to be the same variables as i
get with my script, so there is no $ENV{'USERNAME'}.
Björn

"Charlton, Mark" wrote:

> I am by no means an expert, (I'm barely a beginner!), but isn't the username
> available through the @ENV array?
>
> Regards
> Mark
>
> -Original Message-
> From: Björn Göhringer [mailto:[EMAIL PROTECTED]]
> Sent: 10 October 2001 09:54
> To: [EMAIL PROTECTED]
> Subject: trying to access nt-variables to include it in html
>
> we want to include the environment variable "username" in an html page
> so we can start different actions depending on which user is logged in
> and accesses the page. so when i go to the command line and execute the
> command
>
> c:\> perl -e "system(\"set > variables.txt\")";
>
> i get a list of all the nt variables in the file "variables.txt"
> including username (USERNAME=administrator, for example). now i made a
> script which should create an html page and include the variable:
>
> print "...blablabla";
> ...
> system("set > variables.txt");
> $file = "variables.txt";
> open FILE, $file;
> while () {
> if ($_ =~ /USERNAME=(.+)/) {
> $username = $1;
> }
> }
> print $username;
> ...
>
> when i call this script in the browser, i get a list of all the
> WEBSERVER variables in the file, which do NOT include username! how can
> i access this variable from the script???
> thanks in advance,
> björn
>
> ___
> 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: trying to access nt-variables to include it in html

2001-10-10 Thread Charlton, Mark

I am by no means an expert, (I'm barely a beginner!), but isn't the username
available through the @ENV array?

Regards
Mark

-Original Message-
From: Björn Göhringer [mailto:[EMAIL PROTECTED]]
Sent: 10 October 2001 09:54
To: [EMAIL PROTECTED]
Subject: trying to access nt-variables to include it in html


we want to include the environment variable "username" in an html page
so we can start different actions depending on which user is logged in
and accesses the page. so when i go to the command line and execute the
command

c:\> perl -e "system(\"set > variables.txt\")";

i get a list of all the nt variables in the file "variables.txt"
including username (USERNAME=administrator, for example). now i made a
script which should create an html page and include the variable:

print "...blablabla";
...
system("set > variables.txt");
$file = "variables.txt";
open FILE, $file;
while () {
if ($_ =~ /USERNAME=(.+)/) {
$username = $1;
}
}
print $username;
...

when i call this script in the browser, i get a list of all the
WEBSERVER variables in the file, which do NOT include username! how can
i access this variable from the script???
thanks in advance,
björn

___
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: Text flow in PDF

2001-10-10 Thread Oliver Manickum

Hey Lee,

Are you talking about Editing the PDF to format it ?.. 

- Olly

--
From: Lee Goddard [mailto:[EMAIL PROTECTED]]
Subject: Text flow in PDF



I know about Formatting Object and don't have time
to set up the servers - is there another way to flow
text in a PDF doc?  Auto-paragraphing, etc?  I've
looked at all the PDF::* pods, and seen nothing -
is it my job to write them for CPAN...?

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