Posted by member 302889 on 2006-10-09 19:33:07 link
i've deleted the !Cycle script now and changed the !Shutdown_Sleep_Counter script to this. It works better this way i think...
*Script bang !Shutdown_Sleep_Counter
*Script label start
*Script gotoif ("%{canceled}" = "1") end
*Script exec !Pause 1000
*Script exec !varAdd SleepMSecs -1000
*Script exec !Varset SleepHrs %{SleepMSecs}
*Script exec !varDiv SleepHrs 3600000
*Script exec !Varset SleepHrsMod %{SleepMSecs}
*Script exec !varMod SleepHrsMod 3600000
*Script exec !varAdd SleepHrs -%{SleepHrsMod}
*Script exec !Varset SleepMins %{SleepMSecs}
*Script exec !Varset SleepMinsMod %{SleepHrs}
*Script exec !VarMul SleepMinsMod 3600000
*Script exec !ifEval ("%{SleepHrs}" > "0") !varAdd SleepMins -%{SleepMinsMod}
*Script exec !varDiv SleepMins 60000
*Script exec !Varset SleepMinsMod2 %{SleepMSecs}
*Script exec !varMod SleepMinsMod2 60000
*Script exec !varAdd SleepMins -%{SleepMinsMod2}
*Script exec !Varset SleepSecs %{SleepMSecs}
*Script exec !ifEval ("%{SleepHrs}" > "0") !varAdd SleepSecs -%{SleepMinsMod}
*Script exec !Varset SleepSecsMod %{SleepMins}
*Script exec !VarMul SleepSecsMod 60000
*Script exec !varAdd SleepSecs -%{SleepMinsMod}
*Script exec !varDiv SleepSecs 1000
*Script exec !LabelSetText SleepCounter "%{SleepHrs}:%{SleepMins}:%{SleepSecs}"
*Script gotoif ("%{SleepMSecs}" => "0") Start
*Script label end
*Script exec !LabelHide SleepPanel
*Script exec !Varset canceled 0
*Script exec !varset sleepstarted 0
*Script ~bang
*Script label start
*Script gotoif ("%{canceled}" = "1") end
*Script exec !Pause 1000
*Script exec !varAdd SleepMSecs -1000
*Script exec !Varset SleepHrs %{SleepMSecs}
*Script exec !varDiv SleepHrs 3600000
*Script exec !Varset SleepHrsMod %{SleepMSecs}
*Script exec !varMod SleepHrsMod 3600000
*Script exec !varAdd SleepHrs -%{SleepHrsMod}
*Script exec !Varset SleepMins %{SleepMSecs}
*Script exec !Varset SleepMinsMod %{SleepHrs}
*Script exec !VarMul SleepMinsMod 3600000
*Script exec !ifEval ("%{SleepHrs}" > "0") !varAdd SleepMins -%{SleepMinsMod}
*Script exec !varDiv SleepMins 60000
*Script exec !Varset SleepMinsMod2 %{SleepMSecs}
*Script exec !varMod SleepMinsMod2 60000
*Script exec !varAdd SleepMins -%{SleepMinsMod2}
*Script exec !Varset SleepSecs %{SleepMSecs}
*Script exec !ifEval ("%{SleepHrs}" > "0") !varAdd SleepSecs -%{SleepMinsMod}
*Script exec !Varset SleepSecsMod %{SleepMins}
*Script exec !VarMul SleepSecsMod 60000
*Script exec !varAdd SleepSecs -%{SleepMinsMod}
*Script exec !varDiv SleepSecs 1000
*Script exec !LabelSetText SleepCounter "%{SleepHrs}:%{SleepMins}:%{SleepSecs}"
*Script gotoif ("%{SleepMSecs}" => "0") Start
*Script label end
*Script exec !LabelHide SleepPanel
*Script exec !Varset canceled 0
*Script exec !varset sleepstarted 0
*Script ~bang