回复 16# multiple1902 的帖子
哥
谢谢
我现在写的 不知道还有错误没有
剩下就是测试了
a=hour(now)
if
a>=8 and a<22 then
do until(c>=3)
dim WSHshellD
set WSHshellD = wscript.createobject("wscript.shell")
wscript.sleep 600000
b=hour(now)
c=b-a
loop
msgbox chr(13) + "爸爸:上了就要三个小时了,一分钟就关机了啊,为
了你的健康,爱你的儿子"
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 60 "
set WSHshellA =nothing
elseif a>=22
and
a<24
then
do until(a=0)
dim WSHshellE
set WSHshellE = wscript.createobject("wscript.shell")
wscript.sleep 600000
a=hour(now)
loop
msgbox chr(13) + "爸爸,已经十二点,半分钟就关机了啊,为了你的健康
,爱你的儿子"
dim WSHshellB
set WSHshellB = wscript.createobject("wscript.shell")
WSHshellB.run "cmd.exe /c shutdown -r -t 30 "
set WSHshellB =nothing
else
msgbox chr(13) + "爸爸,已经过了十二点了,半分钟就关机了啊,为了你
的健康,爱你的儿子"
dim WSHshellC
set WSHshellC = wscript.createobject("wscript.shell")
WSHshellC.run "cmd.exe /c shutdown -r -t 30 "
set WSHshellC =nothing
end if