时间提醒 VBS

 

MsgBox "start timer"
While True
 str = GetTimeStr
 Select Case GetTimeStr
  Case "10:00" MsgBox str
  Case "11:00" MsgBox str
  Case "12:00" MsgBox str
  Case "14:30" MsgBox str
  Case "15:30" MsgBox str
  Case "16:30" MsgBox str
  Case "17:30" MsgBox str
  Case "20:30" MsgBox str
  Case "21:30" MsgBox str
  Case "22:30" MsgBox str
  Case "23:15" MsgBox str
 End Select
 WScript.Sleep 1000*60
Wend

Function GetTimeStr()
 GetTimeStr = Add0(Hour(Now)) & ":" & Add0(Minute(Now))
End Function

Function Add0(i)
 If i<10 Then 
  Add0 = 0&i
 Else
  Add0 = i
 End If
End Function

你可能感兴趣的:(时间提醒 VBS)