天天看點

簡單的計時器

'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