Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. @Echo off
  2. echo.
  3. Echo date time > nul
  4. Mode 8F,25
  5. mode con:cols=70 lines=10
  6.  
  7. :Loopz
  8. cls
  9. Color 80
  10. Call Button 15 3 D0 " Start " 45 3 D0 " Exit " X _Box _hover
  11. GetInput /M %_Box% /H 50
  12.  
  13. Title button # %Errorlevel% clicked.
  14. if %Errorlevel%==1 goto :Start
  15. if not %Errorlevel%==1 goto :Exit
  16.  
  17. :Start
  18. color DF
  19. cls
  20. Title Alana's Timer
  21. Echo Hello and welcome to your work timer Alana.
  22. Echo.
  23. Echo It is %DATE% and the time is %TIME%
  24. pause
  25. (goto :Durationget)
  26. if @Errorlevel==1 goto :Start
  27. if @Errorlevel== goto :Durationget
  28. if @Errorlevel==3 goto :exit
  29.  
  30. :Exit
  31. exit
  32.  
  33. :Durationget
  34. setlocal enableextensions enabledelayedexpansion
  35. cls
  36. set /p "Duration=How long (In Hours) Do you have to work? "
  37. set /a "Test=Duration"
  38. if %Test% EQU 0 (
  39. if %Duration% EQU 0 (
  40. echo Number
  41. ) else (
  42. echo Alana,that isnt a number.
  43. goto :Durationget
  44. )
  45. ) else (
  46. echo Okay.Ive got you set for %Duration% Hours.
  47. title Alanas working Timer %Duration% hours total.
  48. )
  49. cls
  50. Echo Thank you for working for %Duration% hours.
  51. (goto :Initiate)
  52.  
  53. :Initiate
  54. Set /p "Responce=(Would you like to begin now?(Yes will begin the timer) "
  55. if %Responce%== yes goto :Timer
  56. if %Responce%== Yes goto :Timer
  57. if %Responce%== "" goto :Start
  58. if Not %Responce%== Yes goto :Start
  59. if Not %Responce%== yes goto :Start
  60.  
  61. :Timer
  62. Echo Timer has Started.
  63. Cls
  64. set /a loop = 1
  65. set HoursL=%Duration%
  66. echo %HoursL% Remaining. > nul
  67. goto :loop
  68.  
  69. :Loop
  70.  
  71. set file= C:\Users\Alana\Desktop\Alanas Timer\Click.wav
  72. ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
  73. echo Sound.URL = "%file%"
  74. echo Sound.Controls.play
  75. echo do while Sound.currentmedia.duration = 0
  76. echo wscript.sleep 100
  77. echo loop
  78. echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
  79. start /min sound.vbs
  80. timeout /t 20 > nul
  81. echo Query # %loop%
  82. cls
  83. set /a loop=%loop%+1
  84. if "%loop%"=="180" goto next
  85. goto loop
  86.  
  87. :next
  88. set /a loop = 1
  89. set /a HoursL=HoursL-1
  90. Cls
  91. echo You have completed one hour of work.remember to give your eyes a rest!
  92. echo you have %HoursL% hours left.
  93. pause
  94. if "%HoursL%"=="0" goto :Done
  95. if Not %HoursL%=="0" goto :loop
  96.  
  97. :Done
  98. set file= C:\Users\Alana\Desktop\Alanas Timer\succeed.wav
  99. ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
  100. echo Sound.URL = "%file%"
  101. echo Sound.Controls.play
  102. echo do while Sound.currentmedia.duration = 0
  103. echo wscript.sleep 100
  104. echo loop
  105. echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
  106. start /min sound.vbs
  107. echo You are finished! hooray!! (pressing any key will close program)
  108. Pause
  109.  
  110. :er3
  111. cls
  112. color 8F
  113. pause > nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement