args Val, Start, End, Width, AutoClose, Display, Props static D = Display static P = "%" if(!Display) D = P static AC = AutoClose if(!End) End = 100 static E = End if(!Width) Width = 200 static C = cl.Create("Progress", 1) C.Insert(0) C.SetLabel(0, "*control progress " ++ Val ++ " " ++ Start ++ " " ++ End) C.SetProperties("Format=barsize tooltips flat position: middlecaption") if(Props) C.AddProperties(Props) C.SetWidth(0, Width) C.Insert(0) C.AddLeft(0, "*bar close Progress") C.SetWidth(0, 60) C.SetToolTip(0, "Left: Close/_____________/Start: " ++ Start ++ "/End: " ++ End) C.show @Current args Val local Temp = Val switch (D) case P Temp ++= D break case "/" Temp ++= D ++ E endswitch C.SetLabel(0, Temp) C.SetCtrlValue(1, Val) if(Val >= E && AC) do wait.forinterval(AC) C.close endif