473,700 Members | 3,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loading Progress in perl

1 New Member
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 1262

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

Similar topics

3
1314
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 that the script is working or display data ie, kb downloaded so far... ATM I am just calling a clear screen every pass with a little nap, nasty. Something along these lines: for i in range(1000):
2
1566
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 large content in blob columns. I observe the max_allowed_packet setting and 'split' blobs too large among multiple rows. All is fine during testing. However, when I try a production load (which should load about 1.5G to the various
4
5727
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 file is finished uploading but am not sure how to do it while file is uploading. Some sample code would be welcomed with open arms. Thank You.
11
2149
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. Thank you, Simon
7
5491
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. Problem is when I put page 'YYZ.aspx' in iframe of another page, let's say 'Home.aspx'. In short: (page (page in iframe(page in iframe) ) ) Progress bar shows ones (fast), then second time(kind of fast) and then third time. And this time it never...
0
9741
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. I need it to be compiled with threads. Anyone have any wisdom on how best to do this? Here's a transcript of my latest attempt. It's long; you might want to skip to the bottom, where I try "make" and the fatal errors start happening.
2
444
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 a menuPanel in the left and content a panel in the right, in the panel I am loading forms... when I select a item from the menuPanel I dispose the form in the right and
5
4041
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 want to use a loader progress bar. I did a plain expanding gif but the problem is that it prevents me at the end from redirecting. Do you have in mind any nice script that might do that? AJAX would be a good solution. Or something that will pop...
1
47465
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8713
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8639
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9203
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9059
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8912
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7795
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2021
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.