G
George
After months of hard work, I have finished my perl program while, at
the same time, reading perldoc.
I am running Windows XP (SP2), ActiveState Perl v5.8.7. My program is
about 2000 lines long and it starts with "use strict; use warnings;..."
(it does not have the #!perl-shebang-line, though).
It reads in more than 100 megs of plain text-data, moves most of the
data into a scalar, some into hashes, other into arrays, sorts them,
rings all sorts of bells and blows the occasional whistle as it goes
along, before it creates about 500 megs worth of Html, distributed
(more or less) evenly over 2000 output files.
It takes 30 minutes run-time for my perl program to complete, so I said
to myself: "...I am not stupid, man, I shall print some progress
messages (a simple counter will do) for every 10 lines read to STDERR,
before I fall asleep while watching the program..."
I have said it, so I have done it!
Now, printing the counter to STDERR works fine, but here is the deal:
===================================================
How can I (instead of a counter printed to STDERR) have a window pop up
with a fancy Microsoft-style progress bar, such as, for example, the
progress bar displayed by an installation procedure?
I was thinking of creating a small perl program which runs with
wperl.exe (so no annoying MS-Dos window pops up), this small perl
program then calls some sort of Microsoft DLL function to initialise a
pop-up window for the progress bar.
Then it "forks" off (I hope this term is politically correct) my
2000-line-perl-program and spends 30 minutes listening on STDERR to all
the messages my 2000-line-perl-program will eventually print. For every
counter printed to STDERR, my small perl program shall advance the
progress bar in the Microsoft pop-up window by 2 millimetres. In the
(unlikely) event that my 2000-line-perl-program dies, my small perl
program should be notified immediately, so it can react accordingly.
Am I completely wrong here ?
I hope you guys can push me... (...in the right direction, that is...)
Thanks in advance
George
the same time, reading perldoc.
I am running Windows XP (SP2), ActiveState Perl v5.8.7. My program is
about 2000 lines long and it starts with "use strict; use warnings;..."
(it does not have the #!perl-shebang-line, though).
It reads in more than 100 megs of plain text-data, moves most of the
data into a scalar, some into hashes, other into arrays, sorts them,
rings all sorts of bells and blows the occasional whistle as it goes
along, before it creates about 500 megs worth of Html, distributed
(more or less) evenly over 2000 output files.
It takes 30 minutes run-time for my perl program to complete, so I said
to myself: "...I am not stupid, man, I shall print some progress
messages (a simple counter will do) for every 10 lines read to STDERR,
before I fall asleep while watching the program..."
I have said it, so I have done it!
Now, printing the counter to STDERR works fine, but here is the deal:
===================================================
How can I (instead of a counter printed to STDERR) have a window pop up
with a fancy Microsoft-style progress bar, such as, for example, the
progress bar displayed by an installation procedure?
I was thinking of creating a small perl program which runs with
wperl.exe (so no annoying MS-Dos window pops up), this small perl
program then calls some sort of Microsoft DLL function to initialise a
pop-up window for the progress bar.
Then it "forks" off (I hope this term is politically correct) my
2000-line-perl-program and spends 30 minutes listening on STDERR to all
the messages my 2000-line-perl-program will eventually print. For every
counter printed to STDERR, my small perl program shall advance the
progress bar in the Microsoft pop-up window by 2 millimetres. In the
(unlikely) event that my 2000-line-perl-program dies, my small perl
program should be notified immediately, so it can react accordingly.
Am I completely wrong here ?
I hope you guys can push me... (...in the right direction, that is...)
Thanks in advance
George