是这样的,现在有两个VBS1和VBS2,VBS1是循环检测即时钟点,VBS2是一个延时循环提示程序,如何把VBS1合拼到VBS2中呢?
VBS1:- Set WshShell = CreateObject("Wscript.Shell")
- SleepTime = "23:00:00"
- While true
- if DateDiff("s", Time, SleepTime) < 0 then
- WshShell.Popup "睡眠时间已到,马上就会关机! ", 20, "温馨提示", vbInformation
- WshShell.run "shutdown -s -r -t 0"
- Wscript.Quit
- end if
- WScript.Sleep(10000)
- wend
复制代码
VBS2:
- Set WshShell = CreateObject("Wscript.Shell")
- for i = 1 to 3
- Wscript.Sleep 1000*60*60
- WshShell.Popup "你已经使用电脑" &i& "个小时了,请注意休息! ", 10, "温馨提示", vbInformation
- next
- Wscript.Sleep 1000*15
- WshShell.Popup "电脑的使用时间已到,马上就会关机! ", 20, "温馨提示", vbInformation
- WshShell.run "shutdown -s -r -t 0"
复制代码
[ 本帖最后由 newxso 于 2008-11-10 09:03 编辑 ] |