Quote:
Originally Posted by quick99si
Code:
varAutoRunTime="00:01"
varSelf = SystemPath("ScriptPath") \ SystemPath("ScriptName") & SystemPath("ScriptExt")
varMort = SystemPath("ScriptExe") \ "MortScript.exe"
varAutoRunTimeH = part(varAutoRunTime,":",1)
varAutoRunTimeM = part(varAutoRunTime,":",2)
If(varAutoRunTimeH < 0 OR varAutoRunTimeH > 23 OR varAutoRunTimeM < 0 OR varAutoRunTimeM > 60)
varAutoRunTimeH="07"
varAutoRunTimeH="00"
EndIf
varTomorrow = TimeStamp()+86400
varTomorrowMidnight = varTomorrow - (FormatTime("H",varTomorrow)*3600) - (FormatTime("i",varTomorrow)*60) - (FormatTime("s",varTomorrow))
varTomorrowSchedule = varTomorrowMidnight + (varAutoRunTimeH*3600) + (varAutoRunTimeM*60)
|
can you possibly put comments as to what each line is doing ? i think i understand the whole timestamp and unix format .. i beilieve with the IF statement you are ensuring it to be at MIDNIGHT , considering TimeStamp get the amount of seconds FROM 01/01/1970 ...