另存时需要改变编码,ANSI
[Asm] 纯文本查看 复制代码 MsgBox "已开始服务"
'调用语音库
Set objTTS = CreateObject("sapi.spvoice")
Dim lastHourReported
lastHourReported = -1 ' 用于跟踪上次报告的小时
'循环检查时间
Do
If Second(Time) = 0 Then
Dim minuteNow, hourNow
minuteNow = Minute(Now)
hourNow = Hour(Now)
' 如果小时改变了,或者这是该小时的第一个整点,则报告日期
If hourNow <> lastHourReported Or minuteNow = 0 Then
objTTS.Speak "欢迎大家来到吾爱破解,现在是北京时间 " & Year(Now) & "-" & Month(Now) & "-" & Day(Now) & " " & Hour(Time) & ":" & Right("0" & minuteNow, 2)
lastHourReported = hourNow
End If
Select Case minuteNow
Case 0, 15, 30, 42, 45
objTTS.Speak "欢迎大家来到吾爱破解,现在是北京时间 " & Year(Now) & "-" & Month(Now) & "-" & Day(Now) & " " & Hour(Time) & ":" & Right("0" & minuteNow, 2)
End Select
End If
WScript.Sleep 1000 ' 一秒钟执行一次,以避免 CPU 占用
Loop |