great topic ! excuse me for replying on a covered topic but I could not resist the temptation to post one more progress bar !

The only thing you have to do is to write the total number of your kix / shell commands or the total lenght of a loop.

here it is :


code:


; This is a progress bar code
; George Bouras
; root@novastar.dtdns.net

;---------------------------------------
; write here the total length of the job


$total_job=40


;----------------------------------------


setascii(on) cls break on
color y+/n box(17,1,19,15,single)
color g+/n at(18,2) "done : "
color y+/n box(20,1,23,78,single)
color c+/n at(18,13) "%"
$done_job=1

do
$percent_job=$done_job*100/$total_job
$previus_job=$bar_job
$bar_job=$percent_job*77/100

;----------------------------------------
; Place here your custom script commands.
; Be carefull so your total commands
; much the $total_job , or the loop you
; want to run end to $total_job number !!!
;
; command 1
; command 2
; .
; .
; .
; command n
;----------------------------------------

; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>
; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>


; Here is the graphics machine (!)

if $bar_job = $previus_job goto skip_bar endif
do
at(18,9) $percent_job
if $previus_job < 2
at(21,2) chr(219) at(22,2) chr(219)
else
at(21,$previus_job) chr(219) at(22,$previus_job) chr(219)
endif
$previus_job=$previus_job+1
until $previus_job=$bar_job+1
:skip_bar


; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>
; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>

$done_job=$done_job+1
until $done_job=$total_job+1

:end