超级厉害的VBS定时提醒脚本 Remind.vbs
程序员文章站
2022-04-29 09:12:56
'/*========================================================================= &nbs...
'/*=========================================================================
' * intro 定时提醒,格式:时间|提示语,具体使用方法可以参考例子
' * filename remind.vbs
' * author yongfa365
' * version v1.0
' * web http://www.yongfa365.com
' * email yongfa365[at]qq.com
' * firstwrite http://www.yongfa365.com/item/remind.vbs.html
' * madetime 2008-06-18 19:26:32
' * lastmodify 2008-06-18 19:26:32
' *==========================================================================*/
tx = true
used = ""
t = ""
'■■■■■■■■■■■■■■可修改区域开始■■■■■■■■■■■■■■
t = t & "|" & "10:00:00|hello,hi,是美女不!"
t = t & "|" & "11:30:00|美女,快吃饭了!"
t = t & "|" & "14:00:00|困不困?困了就休息会,注意关门,小心被偷窥哦,哇嘎嘎"
t = t & "|" & "16:30:00|想帅哥了吧,笑一笑^-^"
t = t & "|" & "17:30:00|好像要下班了哦。"
t = t & "|" & "18:00:00|帅哥还没回家?快提醒下"
t = t & "|" & "22:30:00|哥哥,备份当前数据,时间要到了。"
'■■■■■■■■■■■■■■可修改区域结束■■■■■■■■■■■■■■
t = right(t, len(t) -1)
do while tx
wscript.sleep 10000'10秒种检测一次
tixing()
loop
function tixing()
t2 = split(t, "|")
for i = lbound(t2) to ubound(t2) step 2
txsj = cdate(date & " " & t2(i))
if dateadd("n", -1, now) <= txsj and dateadd("n", 1, now) >= txsj and instr(used, t2(i)) = 0 then
'时间相差一分钟且没提醒过的的话提醒
msgbox t2(i + 1)
used = used & t2(i)'提醒过的记录一下
end if
next
end function
' * intro 定时提醒,格式:时间|提示语,具体使用方法可以参考例子
' * filename remind.vbs
' * author yongfa365
' * version v1.0
' * web http://www.yongfa365.com
' * email yongfa365[at]qq.com
' * firstwrite http://www.yongfa365.com/item/remind.vbs.html
' * madetime 2008-06-18 19:26:32
' * lastmodify 2008-06-18 19:26:32
' *==========================================================================*/
tx = true
used = ""
t = ""
'■■■■■■■■■■■■■■可修改区域开始■■■■■■■■■■■■■■
t = t & "|" & "10:00:00|hello,hi,是美女不!"
t = t & "|" & "11:30:00|美女,快吃饭了!"
t = t & "|" & "14:00:00|困不困?困了就休息会,注意关门,小心被偷窥哦,哇嘎嘎"
t = t & "|" & "16:30:00|想帅哥了吧,笑一笑^-^"
t = t & "|" & "17:30:00|好像要下班了哦。"
t = t & "|" & "18:00:00|帅哥还没回家?快提醒下"
t = t & "|" & "22:30:00|哥哥,备份当前数据,时间要到了。"
'■■■■■■■■■■■■■■可修改区域结束■■■■■■■■■■■■■■
t = right(t, len(t) -1)
do while tx
wscript.sleep 10000'10秒种检测一次
tixing()
loop
function tixing()
t2 = split(t, "|")
for i = lbound(t2) to ubound(t2) step 2
txsj = cdate(date & " " & t2(i))
if dateadd("n", -1, now) <= txsj and dateadd("n", 1, now) >= txsj and instr(used, t2(i)) = 0 then
'时间相差一分钟且没提醒过的的话提醒
msgbox t2(i + 1)
used = used & t2(i)'提醒过的记录一下
end if
next
end function