CALL @WIN1
_SUB WIN1,W303H100,进度条,
    SET-def from=0
    SET-def to=10  //超时秒数
    SET-def K=%&to%
    PBAR PBAR1,L22T13W200H16,20
    ENVI @PBAR1.color=0xFF
    ENVI @PBAR1.bkcolor=0xFF00
    @ TEAM TIME  t1,1000, CALL OnTimer1| CALL OnTimer1
_END
_SUB OnTimer1
    CALC &p=(%to% - %&K% ) * 100 / (%&to% - %&from%) #0
    envi @PBAR1=%&p%,%&K%秒  完成%&p%%%  //进度, 文本
    CALC #&K=%&K% - 1
    IFEX $%&K%<0, TEAM ENVI @t1=0| CALL OnOK
_END
