周期性最小化所有窗口并弹窗提示,防止久坐。
set Ws=createobject("Wscript.Shell")
Do
hour_now=Hour(Now)
min_now=Minute(Now)
sec_now=Second(Now)
if hour_now>8 and hour_now<18 and min_now=0 and sec_now =0 then
DisplayDeskForSeconds()
end if
if min_now=30 and sec_now =0 then
DisplayDeskForSeconds()
end if
Wscript.sleep 400
Loop
Function popnotice(sec)
vbs = Ws.Popup( "起身喝水,活动一下吧!" , 1,"Notice " ,vbOKCancel+vbQuestion+vbMsgBoxSetForeground)
if vbs=vbCancel then
Wscript.quit
end if
End Function
Function DisplayDeskForSeconds()
CreateObject("shell.Application").MinimizeAll
for i=1 to 3
popnotice(i)
next
End Function