简单的计时器

来源:互联网 发布:淘宝c店还可以赚到钱吗 编辑:程序博客网 时间:2024/05/22 14:22
'Time Log.vbs
Dim iRelax : iRelax = 0
Dim iRun : iRun = 0 


'________________________________________________________
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")   
Do While True
'Every hour
If (Minute(now()) > 45) And (iRelax = 0) Then
MsgBox "Relax: Drink some water & Records &exercises & deep breath"
iRelax = 0
WScript.Sleep 600000'wait 10 mins
End If



'5.00PM
If  (Hour(now()) = 17) And (iRun = 0) Then
MsgBox "Run, Run, Run"
iRun = 1
End If


WScript.Sleep 180000 'wait 3 mins
Loop
0 0
原创粉丝点击