mainForm.button.oncommand = function(id,event){ mainForm.progress.max = 100; for(i=1;100;1){ mainForm.progress.pos = i; win.delay(100) } }