mIRC Home    About    Download    Register    News    Help

Print Thread
#107174 07/01/05 06:03 PM
Joined: Jan 2005
Posts: 37
S
Scratch Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 37
How do I create a simple text progress bar? What calculations do I need to do?

I have a script that writes text to a file, and I want a text progress bar that echoes to the active window showing the progress.

#107175 07/01/05 06:11 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Here's a simple thing, not sure if it's what you want, it echoes to active window 1-100%. Hope it helps.

Code:
alias prog {
  var %prog = 0
  while (%prog <= 99) {
    inc %prog
    .timer -m 1 $calc(25 * %prog) .echo -a %prog $+ % completed.
  }
} 

#107176 07/01/05 06:19 PM
Joined: Jan 2005
Posts: 37
S
Scratch Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 37
I'm basically trying to create a simple text progress bar that shows the progress as my script writes to a file. When the script finishes writing to the file, the progress bar will show 100%.

I'm just not sure what calculations I need to make.


Link Copied to Clipboard