復(fù)制代碼 代碼如下:
set WshShell = WScript.CreateObject("WScript.Shell")
'對(duì)話框標(biāo)題
alerttitle = "定時(shí)提醒"
'提醒內(nèi)容,vbnewline為換行符
alerttext = vbnewline & vbnewline & "休息一下,活動(dòng)一下胳膊,脖子,腰部。" & vbnewline & vbnewline & vbnewline & "生命在于運(yùn)動(dòng)"& vbnewline & vbnewline & vbnewline
for i = 1 to 12 '12為提醒的次數(shù)
WScript.Sleep(1000*60*45) '每45分鐘提醒一次
msgbox alerttext,4096,alerttitle
next
將上面代碼存為:定時(shí)提醒.vbs ,然后雙擊遠(yuǎn)行,進(jìn)程中會(huì)有一個(gè)wscript.exe的進(jìn)程,結(jié)束后他就不會(huì)提醒了。