473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Loading Progress in perl

I have use this code to make the progress bar.its working terminal i cant get the out put in web browser.

I gonna use this code If you know the answer please hepl me:

Expand|Select|Wrap|Line Numbers
  1. use Tk;
  2. use Tk::WaitBox;
  3. use Tk::ProgressBar;
  4. # print "test1";
  5.  
  6. my $mw="";
  7. $mw = MainWindow->new(-title => 'ProgressBar example');
  8. # print "test2";
  9. $progress = $mw->ProgressBar(
  10.         -width => 30,
  11.         height => 80,
  12.         -from => 0,
  13.         -to => 100,
  14.         -blocks => 50,
  15.         -colors => [0, 'red' , 30, 'red' , 50, 'green' , 80, 'green'],
  16.         -variable => \$percent_done
  17.     )->pack(-fill => 'x');
  18.  
  19. #   $mw->Button(-text => 'Go!', -command=> sub {
  20. $arraycount=10000;
  21. $percentcalculation=$arraycount/100;
  22.   for ($i = 0; $i < $arraycount; $i++) 
  23.   {
  24.      $percent_done = $i/$percentcalculation;
  25.      print "$i\n";
  26.      $mw->update;  # otherwise we don't see how far we are.    
  27.  
  28.   }
Jul 24 '12 #1
0 1241

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robbie | last post by:
Even though this is not very important it would be nice to get working. Basically all I want to do is continuously write to the same line. So I could have a little rotating text thing showing...
2
by: Beau E. Cox | last post by:
Hi - I have an application which is essentially 'read-only' - once the database is loaded it is only read from. So, I am trying to implement it with various indices and a table containg some...
4
by: Kenneth Keeley | last post by:
Hi, I have a page that uploads files to my server and I wish to display a "Please wait while uploading" page to the user while the file is uploading. I have been able to redirect the user once the...
11
by: simon | last post by:
when I execute aspx page, it works about 5 minutes - I calculate some statistics. Is there some way, that I can show user time bar or smething similar? That he nows, that page is working. ...
7
by: Oleg | last post by:
I have a web form let's say 'YYZ.aspx'. It has an iframe in it. When it loads it shows progress bar in IE this way: loading for page then again loading for page in iframe. This part is fine....
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
2
by: Diogo Alves - Software Developer | last post by:
Hi, I am having a giant headache because a progress bar on a statusStrip. Ok I will describe all the details to get help from anyone.... I have a MainForm, this form as a a component that is...
5
by: Aggelos | last post by:
Hello I am doing sevreral scripts like sending a newsletter that might take a while to finish first to prevent the browser from timing out and to keep the user informed of the process progress I...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.