CODE: [Copy to clipboard]
on error resume next
set ws=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
a=0
do until a=1
t=inputbox("注意:本程序只考虑到分种,时间格式为" & vbcrlf & vbcrlf & " 早晨:8点5分要输入0805" & vbcrlf & vbcrlf & " 下午:1点要输入1300" & vbcrlf & vbcrlf & "其它以此类推。","小闹铃","请在些处输入提醒您的时间")
if t="" then
wscript.quit
elseif IsNumeric(t)=false then
msgbox "输入错误,请重新输入!",16+4096,"错误"
elseif len(t)<>4 or left(t,2)>24 or right(t,2)>59 then
msgbox "输入错误,请重新输入!",16+4096,"错误"
else
a=1
call naoling()
end if
loop
sub naoling()
shi=left(t,2)
fen=right(t,2)
do
if timer>3600*shi+60*fen then
ws.run "cmd /c @echo ",0,true
sfjx=Ws.Popup("时间已到,是否继续运行闹铃程序?"& vbcrlf & "如果不退出闹铃将在1分钟后继续提醒。", 10, "闹铃提醒", 4 + 32)
if sfjx=7 then
wscript.quit
else
wscript.sleep 1000*60
end if
end if
wscript.sleep 1000
loop
end sub
[