here you are this works. A I didn't test the code I forgot val() was a function so in patch 5 it owuld have given an error.
do
progress(0,0,200,20,100,50)
sync
loop
function progress(x,y,w,h,max,sval)
`background
ink rgb(255,255,255),0
box x,y,x+w,y+h
`now draw the bar
ink 0,0
percent# = ((sval*1.0) / (max*1.0))
newwidth = int((w-1)*percent#)
box x+1,y+1,x+newwidth,y+h-1
endfunction
It's easy to change colours, etc. now.
The function first works out what percent is complete, then multiplies the overall length of the bar on screen by that value (will be from 0-1). That gives you to length of the bar to show progress on screen.
Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?