VBS计时器
用VBS實現(xiàn)一個以分鐘為單位的計時器:
1 rem msgbox now 'now is the system para 2 3 msgbox "Timer",,"CreatedByXuTao" 4 dim limit 5 limit = int(inputbox("Set your time in minutes!",,Setting)) 6 7 dim a,b,c '保證只提醒一次 8 a=0 9 b=0 10 c=0 11 12 dim cur 13 cur = 0 14 15 m = hour(now)*60 + minute(now) 16 17 while cur<limit 18 19 cur = hour(now)*60+minute(now) - m 20 Wscript.sleep 10000 21 22 if limit-cur=10 and a=0 then 23 msgbox "10 Minutes Left!",,"Warnning" 24 a=1 25 elseif limit-cur=5 and b=0 then 26 msgbox "5 Minutes Left!",,"Warnning" 27 b=1 28 elseif limit-cur=1 and c=0 then 29 msgbox "1 Minute Left!",,"Warnning" 30 c=1 31 end if 32 33 wend 34 35 msgbox "Time is up!",,"OVER"?
轉(zhuǎn)載于:https://www.cnblogs.com/XT-xutao/p/10052675.html
總結(jié)
- 上一篇: 一代测序 二代测序
- 下一篇: Python 用pygame模块播放MP