回复 4# batman
老师,我根据你的代码改的,到了11:38:10提醒吃午饭了,为什么不行呀?
On Error Resume Next
Dim objSHELL, File, RegPath
Set objSHELL = CreateObject("Wscript.Shell")
File = WScript.ScriptFullName
RegPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\AutoRun"
objSHELL.RegRead RegPath
If Err.Number <> 0 Then
Err.Clear
objSHELL.RegWrite RegPath, Chr(34) & File & Chr(34), "REG_SZ"
End If
Dim Birthtime, Nowtime
Birthtime ="11:38:10"
Nowtime =Hour(Now)&":"&Minute(Now)&":"&Second(Now)
If CStr(Nowtime) = Birthtime Then
Do Until CStr(Nowtime) <> Birthtime
objSHELL.Popup "吃午饭了", 5
WScript.Sleep 1000 * 60 * 1
Loop
End If
Set objSHELL = Nothing |