时间提醒 VBS

来源:互联网 发布:淘宝电子产品出现故障 编辑:程序博客网 时间:2024/06/05 17:35
 

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

原创粉丝点击