当前位置:   article > 正文

VBS计时器_vbs timer

vbs timer
  1. rem msgbox now 'now is the system para
  2. msgbox "Timer",,"CreatedByXuTao"
  3. dim limit
  4. limit = int(inputbox("Set your time in minutes!",,Setting))
  5. dim a,b,c '保证只提醒一次
  6. a=0
  7. b=0
  8. c=0
  9. dim cur
  10. cur = 0
  11. m = hour(now)*60 + minute(now)
  12. while cur<limit
  13. cur = hour(now)*60+minute(now) - m
  14. Wscript.sleep 10000
  15. if limit-cur=10 and a=0 then
  16. msgbox "10 Minutes Left!",,"Warnning"
  17. a=1
  18. elseif limit-cur=5 and b=0 then
  19. msgbox "5 Minutes Left!",,"Warnning"
  20. b=1
  21. elseif limit-cur=1 and c=0 then
  22. msgbox "1 Minute Left!",,"Warnning"
  23. c=1
  24. end if
  25. wend
  26. msgbox "Time is up!",,"OVER"

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/301176
推荐阅读
  

闽ICP备14008679号