[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[日期时间] [更新永无止境]Hope计时器

本帖最后由 HOPE2021 于 2021-8-21 15:02 编辑

更新日志
--------------------------------------------------------------------------------------------------
详见117楼

紧急通知
--------------------------------------------------------------------------------------------------
版本 1.0.0004出现重大Bug,请立即暂停使用!
请一定要检查您的电脑配置是否高,否则程序速度将会极慢!
版本 1.0.0009出现重大Bug,请立即暂停使用!
版本 1.0.0010出现重大Bug,请立即暂停使用!
版本 1.0.0011出现重大Bug,请立即暂停使用!
版本 1.0.0013出现重大Bug,请立即暂停使用!

源码[版本 1.0.0001][有冗余,请指正]:
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set Ms=0
  23. set Ms_2=0
  24. @goto :Main
  25. :Main
  26. title Hope计时器
  27. set Error=0
  28. cls
  29. echo.
  30. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  31. echo.
  32. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  33. call :get_key
  34. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  35. if /i "!key!"=="q" (
  36. set /a Ms_2+=3600000
  37. set /a H+=1
  38. )
  39. if /i "!key!"=="w" (
  40. set /a Ms_2-=3600000
  41. set /a H-=1
  42. )
  43. if /i "!key!"=="e" (
  44. set /a Ms_2+=60000
  45. set /a Min+=1
  46. )
  47. if /i "!key!"=="r" (
  48. set /a Ms_2-=60000
  49. set /a Min-=1
  50. )
  51. if /i "!key!"=="t" (
  52. set /a Ms_2+=1000
  53. set /a S+=1
  54. )
  55. if /i "!key!"=="y" (
  56. set /a Ms_2-=1000
  57. set /a S-=1
  58. )
  59. if /i "!key!"=="i" (
  60. exit
  61. )
  62. if /i "!key!"=="u" (
  63. @goto :Start
  64. )
  65. )
  66. for %%i in (%H% %Min% %S%) do (
  67. if %%i Lss 0 (
  68. echo.
  69. echo.    ^>^> 算数错误!
  70. set H=0
  71. set Min=0
  72. set S=0
  73. set Ms=0
  74. set Ms_2=0
  75. call :Vbs_Sleep 100
  76. )
  77. )
  78. if %Ms_2% Gtr 200000000 (
  79. echo.
  80. echo.    ^>^> 算数错误!
  81. set H=0
  82. set Min=0
  83. set S=0
  84. set Ms=0
  85. set Ms_2=0
  86. call :Vbs_Sleep 100
  87. )
  88. if /i "!valid_key!" equ "0" goto :Main
  89. :Error
  90. color 1f
  91. cls
  92. echo.
  93. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  94. echo.
  95. echo.    ^>^> 正在帮您恢复
  96. call :Sleep_Installs
  97. goto :Restart
  98. :Start
  99. set Error=0
  100. cls
  101. if %ms%==10 set /a ms=0
  102. title 计时器[%Ms%/%Ms_2%毫秒]
  103. echo.
  104. echo.    ^>^> %Ms%/%Ms_2%毫秒
  105. echo.
  106. echo.    ^>^> Ctrl+C暂停或退出...
  107. call :Sleep 100
  108. if %Error%==1 goto :Error
  109. set /a Ms+=100
  110. title 计时器[%Ms%/%Ms_2%毫秒]
  111. if %Ms% lss %Ms_2% goto Start
  112. if %Ms% Geq %Ms_2% goto End
  113. :End
  114. cls
  115. color 4e
  116. title Hope计时器 [%Ms%/%Ms_2%毫秒]
  117. Call :Msg "时间到" vbExclamation "Hope计时器"
  118. color 0f
  119. @goto :Restart
  120. :Vbs_Sleep
  121. echo.Wscript.Sleep %1 > Sleep.vbs
  122. call Sleep.vbs > nul
  123. if exist ReturnKey.vbs del ReturnKey.vbs
  124. @goto :eof
  125. :Sleep_Installs
  126. mode con cols=68 lines=5
  127. color 0f
  128. (
  129. echo.-----BEGIN CERTIFICATE-----
  130. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  131. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  132. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  133. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  134. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  135. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  136. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  137. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  138. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  139. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  140. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  141. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  142. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  143. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  144. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  145. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  146. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  147. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  148. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  149. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  150. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  151. echo.AAAAAAAAAAAAAAAAAAAAAA==
  152. echo.-----END CERTIFICATE-----
  153. ) > Sleep.com
  154. Certutil -Decode Sleep.com Sleep.exe > nul
  155. Certutil -Decode -f Sleep.com Sleep.com > nul
  156. goto :eof
  157. :Sleep
  158. set Error=0
  159. if exist Sleep.exe (
  160. Sleep.exe %1
  161. goto :eof
  162. )
  163. if not exist Sleep.exe if exist Sleep.com (
  164. Sleep.com %1
  165. goto :eof
  166. )
  167. if not exist Sleep.exe if not exist Sleep.com (
  168. set Error=1
  169. goto :eof
  170. )
  171. :get_key
  172. rem 用法:call :get_key
  173. set "key="
  174.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  175.   set "key=%key:~-1%"
  176.   set "valid_key=0"
  177. goto :eof
  178. :Msg
  179. Rem 用法: Call :Msg "Text" [buttons] "Title"
  180. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  181. Call ReturnKey.vbs > nul
  182. if exist ReturnKey.vbs del ReturnKey.vbs
  183. goto :eof
复制代码

本帖最后由 HOPE2021 于 2021-8-12 08:43 编辑

版本1.0.0002
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set Ms=0
  23. set Ms_2=0
  24. @goto :Main
  25. :Main
  26. title Hope计时器
  27. set Error=0
  28. cls
  29. echo.
  30. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  31. echo.
  32. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  33. call :get_key
  34. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  35. if /i "!key!"=="q" (
  36. set /a Ms_2+=3600000
  37. set /a H+=1
  38. )
  39. if /i "!key!"=="w" (
  40. set /a Ms_2-=3600000
  41. set /a H-=1
  42. )
  43. if /i "!key!"=="e" (
  44. set /a Ms_2+=60000
  45. set /a Min+=1
  46. )
  47. if /i "!key!"=="r" (
  48. set /a Ms_2-=60000
  49. set /a Min-=1
  50. )
  51. if /i "!key!"=="t" (
  52. set /a Ms_2+=1000
  53. set /a S+=1
  54. )
  55. if /i "!key!"=="y" (
  56. set /a Ms_2-=1000
  57. set /a S-=1
  58. )
  59. if /i "!key!"=="i" (
  60. exit
  61. )
  62. if /i "!key!"=="u" (
  63. @goto :Start
  64. )
  65. )
  66. if %S% Geq 60 set /a Min+=1&set S=0
  67. if %Min% Geq 60 set /a H+=1&set Min=0
  68. for %%i in (%H% %Min% %S%) do (
  69. if %%i Lss 0 (
  70. echo.
  71. echo.    ^>^> 算数错误!
  72. set H=0
  73. set Min=0
  74. set S=0
  75. set Ms=0
  76. set Ms_2=0
  77. call :Vbs_Sleep 100
  78. )
  79. )
  80. if %Ms_2% Gtr 200000000 (
  81. echo.
  82. echo.    ^>^> 算数错误!
  83. set H=0
  84. set Min=0
  85. set S=0
  86. set Ms=0
  87. set Ms_2=0
  88. call :Vbs_Sleep 100
  89. )
  90. if /i "!valid_key!" equ "0" goto :Main
  91. :Error
  92. color 1f
  93. cls
  94. echo.
  95. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  96. echo.
  97. echo.    ^>^> 正在帮您恢复
  98. call :Sleep_Installs
  99. goto :Restart
  100. :Start
  101. set Error=0
  102. cls
  103. if %ms%==10 set /a ms=0
  104. title 计时器[%Ms%/%Ms_2%毫秒]
  105. echo.
  106. echo.    ^>^> %Ms%/%Ms_2%毫秒
  107. echo.
  108. echo.    ^>^> Ctrl+C暂停或退出...
  109. call :Sleep 100
  110. if %Error%==1 goto :Error
  111. set /a Ms+=100
  112. title 计时器[%Ms%/%Ms_2%毫秒]
  113. if %Ms% lss %Ms_2% goto Start
  114. if %Ms% Geq %Ms_2% goto End
  115. :End
  116. cls
  117. color 4e
  118. title Hope计时器 [%Ms%/%Ms_2%毫秒]
  119. Call :Msg "时间到" vbExclamation "Hope计时器"
  120. color 0f
  121. @goto :Restart
  122. :Vbs_Sleep
  123. echo.Wscript.Sleep %1 > Sleep.vbs
  124. call Sleep.vbs > nul
  125. if exist ReturnKey.vbs del ReturnKey.vbs
  126. @goto :eof
  127. :Sleep_Installs
  128. mode con cols=68 lines=5
  129. color 0f
  130. (
  131. echo.-----BEGIN CERTIFICATE-----
  132. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  133. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  134. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  135. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  136. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  137. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  138. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  139. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  140. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  141. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  142. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  143. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  144. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  145. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  146. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  147. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  148. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  149. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  150. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  151. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  152. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. echo.AAAAAAAAAAAAAAAAAAAAAA==
  154. echo.-----END CERTIFICATE-----
  155. ) > Sleep.com
  156. Certutil -Decode Sleep.com Sleep.exe > nul
  157. Certutil -Decode -f Sleep.com Sleep.com > nul
  158. goto :eof
  159. :Sleep
  160. set Error=0
  161. if exist Sleep.exe (
  162. Sleep.exe %1
  163. goto :eof
  164. )
  165. if not exist Sleep.exe if exist Sleep.com (
  166. Sleep.com %1
  167. goto :eof
  168. )
  169. if not exist Sleep.exe if not exist Sleep.com (
  170. set Error=1
  171. goto :eof
  172. )
  173. :get_key
  174. rem 用法:call :get_key
  175. set "key="
  176.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  177.   set "key=%key:~-1%"
  178.   set "valid_key=0"
  179. goto :eof
  180. :Msg
  181. Rem 用法: Call :Msg "Text" [buttons] "Title"
  182. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  183. Call ReturnKey.vbs > nul
  184. if exist ReturnKey.vbs del ReturnKey.vbs
  185. goto :eof
复制代码

TOP

版本1.0.0003
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. title Hope计时器
  30. set Error=0
  31. cls
  32. echo.
  33. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  34. echo.
  35. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  36. call :get_key
  37. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  38. if /i "!key!"=="q" (
  39. set /a Ms_2+=3600000
  40. set /a H+=1
  41. )
  42. if /i "!key!"=="w" (
  43. set /a Ms_2-=3600000
  44. set /a H-=1
  45. )
  46. if /i "!key!"=="e" (
  47. set /a Ms_2+=60000
  48. set /a Min+=1
  49. )
  50. if /i "!key!"=="r" (
  51. set /a Ms_2-=60000
  52. set /a Min-=1
  53. )
  54. if /i "!key!"=="t" (
  55. set /a Ms_2+=1000
  56. set /a S+=1
  57. )
  58. if /i "!key!"=="y" (
  59. set /a Ms_2-=1000
  60. set /a S-=1
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. if /i "!key!"=="u" (
  66. @goto :Start
  67. )
  68. )
  69. if %S% Geq 60 set /a Min+=1&set S=0
  70. if %Min% Geq 60 set /a H+=1&set Min=0
  71. for %%i in (%H% %Min% %S%) do (
  72. if %%i Lss 0 (
  73. echo.
  74. echo.    ^>^> 算数错误!
  75. call :Vbs_Sleep 100
  76. @goto :Restart
  77. )
  78. )
  79. if %Ms_2% Gtr 200000000 (
  80. echo.
  81. echo.    ^>^> 算数错误!
  82. call :Vbs_Sleep 100
  83. @goto :Restart
  84. )
  85. if /i "!valid_key!" equ "0" goto :Main
  86. :Error
  87. color 1f
  88. cls
  89. echo.
  90. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  91. echo.
  92. echo.    ^>^> 正在帮您恢复
  93. call :Sleep_Installs
  94. goto :Restart
  95. :Start
  96. set Error=0
  97. cls
  98. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  99. echo.
  100. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
  101. echo.
  102. echo.    ^>^> Ctrl+C暂停或退出...
  103. call :Sleep 100
  104. if %Error%==1 goto :Error
  105. set /a Ms+=100
  106. if %Ms%==1000 set /a S_2+=1&set Ms=0
  107. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  108. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  109. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  110. if /i "!valid_key!" equ "0" goto :Start
  111. :End
  112. cls
  113. color 4e
  114. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  115. Call :Msg "时间到" vbExclamation "Hope计时器"
  116. color 0f
  117. @goto :Restart
  118. :Vbs_Sleep
  119. echo.Wscript.Sleep %1 > Sleep.vbs
  120. call Sleep.vbs > nul
  121. if exist ReturnKey.vbs del ReturnKey.vbs
  122. @goto :eof
  123. :Sleep_Installs
  124. mode con cols=68 lines=5
  125. color 0f
  126. (
  127. echo.-----BEGIN CERTIFICATE-----
  128. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  129. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  130. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  131. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  132. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  133. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  134. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  135. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  136. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  137. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  138. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  139. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  140. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  141. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  142. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  143. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  144. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  145. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  146. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  147. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  148. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  149. echo.AAAAAAAAAAAAAAAAAAAAAA==
  150. echo.-----END CERTIFICATE-----
  151. ) > Sleep.com
  152. Certutil -Decode Sleep.com Sleep.exe > nul
  153. Certutil -Decode -f Sleep.com Sleep.com > nul
  154. goto :eof
  155. :Sleep
  156. set Error=0
  157. if exist Sleep.exe (
  158. Sleep.exe %1
  159. goto :eof
  160. )
  161. if not exist Sleep.exe if exist Sleep.com (
  162. Sleep.com %1
  163. goto :eof
  164. )
  165. if not exist Sleep.exe if not exist Sleep.com (
  166. set Error=1
  167. goto :eof
  168. )
  169. :get_key
  170. rem 用法:call :get_key
  171. set "key="
  172.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  173.   set "key=%key:~-1%"
  174.   set "valid_key=0"
  175. goto :eof
  176. :Msg
  177. Rem 用法: Call :Msg "Text" [buttons] "Title"
  178. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  179. Call ReturnKey.vbs > nul
  180. if exist ReturnKey.vbs del ReturnKey.vbs
  181. goto :eof
复制代码

TOP

本帖最后由 HOPE2021 于 2021-8-12 10:06 编辑

有重大谬误,请停止使用!
版本1.0.0004[有大量冗余,请指正]
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. title Hope计时器
  30. set Error=0
  31. cls
  32. echo.
  33. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  34. echo.
  35. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  36. call :get_key
  37. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  38. if /i "!key!"=="q" (
  39. set /a Ms_2+=3600000
  40. set /a H+=1
  41. )
  42. if /i "!key!"=="w" (
  43. set /a Ms_2-=3600000
  44. set /a H-=1
  45. )
  46. if /i "!key!"=="e" (
  47. set /a Ms_2+=60000
  48. set /a Min+=1
  49. )
  50. if /i "!key!"=="r" (
  51. set /a Ms_2-=60000
  52. set /a Min-=1
  53. )
  54. if /i "!key!"=="t" (
  55. set /a Ms_2+=1000
  56. set /a S+=1
  57. )
  58. if /i "!key!"=="y" (
  59. set /a Ms_2-=1000
  60. set /a S-=1
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. )
  66. if %S% Lss 0 (
  67. if %Min% Geq 0 if %H% Gtr 0 (
  68. set /a Min-=1&set /a S+=60
  69. )
  70. if %Min% Gtr 0 if %H% Geq 0 (
  71. set /a Min-=1&set /a S+=60
  72. )
  73. if %Min% Gtr 0 if %H% Gtr 0 (
  74. set /a Min-=1&set /a S+=60
  75. )
  76. if %Min% Leq 0 if %H% Leq 0 (
  77. echo.
  78. echo.    ^>^> 算数错误!
  79. call :Vbs_Sleep 100
  80. @goto :Restart
  81. )
  82. )
  83. if %Min% Lss 0 (
  84. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  85. if %H% Leq 0 (
  86. echo.
  87. echo.    ^>^> 算数错误!
  88. call :Vbs_Sleep 100
  89. @goto :Restart
  90. )
  91. )
  92. if %H% Lss 0 (
  93. echo.
  94. echo.    ^>^> 算数错误!
  95. call :Vbs_Sleep 100
  96. @goto :Restart
  97. )
  98. if %Ms_2% Gtr 200000000 (
  99. echo.
  100. echo.    ^>^> 算数错误!
  101. call :Vbs_Sleep 100
  102. @goto :Restart
  103. )
  104. if %S% Geq 60 set /a Min+=1&set S=0
  105. if %Min% Geq 60 set /a H+=1&set Min=0
  106. if /i "!key!"=="u" (
  107. @goto :Start
  108. )
  109. if /i "!valid_key!" equ "0" goto :Main
  110. :Error
  111. color 1f
  112. cls
  113. echo.
  114. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  115. echo.
  116. echo.    ^>^> 正在帮您恢复
  117. call :Sleep_Installs
  118. goto :Restart
  119. :Start
  120. set Error=0
  121. cls
  122. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  123. echo.
  124. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
  125. echo.
  126. echo.    ^>^> Ctrl+C暂停或退出...
  127. call :Sleep 100
  128. if %Error%==1 goto :Error
  129. set /a Ms+=100
  130. if %Ms%==1000 set /a S_2+=1&set Ms=0
  131. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  132. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  133. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  134. if /i "!valid_key!" equ "0" goto :Start
  135. :End
  136. cls
  137. color 4e
  138. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  139. Call :Msg "时间到" vbExclamation "Hope计时器"
  140. color 0f
  141. @goto :Restart
  142. :Vbs_Sleep
  143. echo.Wscript.Sleep %1 > Sleep.vbs
  144. call Sleep.vbs > nul
  145. if exist ReturnKey.vbs del ReturnKey.vbs
  146. @goto :eof
  147. :Sleep_Installs
  148. mode con cols=68 lines=5
  149. color 0f
  150. (
  151. echo.-----BEGIN CERTIFICATE-----
  152. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  154. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  155. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  156. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  157. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  158. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  159. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  160. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  161. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  162. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  163. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  164. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  165. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  166. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  167. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  168. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  169. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  170. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  171. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  172. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  173. echo.AAAAAAAAAAAAAAAAAAAAAA==
  174. echo.-----END CERTIFICATE-----
  175. ) > Sleep.com
  176. Certutil -Decode Sleep.com Sleep.exe > nul
  177. Certutil -Decode -f Sleep.com Sleep.com > nul
  178. goto :eof
  179. :Sleep
  180. set Error=0
  181. if exist Sleep.exe (
  182. Sleep.exe %1
  183. goto :eof
  184. )
  185. if not exist Sleep.exe if exist Sleep.com (
  186. Sleep.com %1
  187. goto :eof
  188. )
  189. if not exist Sleep.exe if not exist Sleep.com (
  190. set Error=1
  191. goto :eof
  192. )
  193. :get_key
  194. rem 用法:call :get_key
  195. set "key="
  196.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  197.   set "key=%key:~-1%"
  198.   set "valid_key=0"
  199. goto :eof
  200. :Msg
  201. Rem 用法: Call :Msg "Text" [buttons] "Title"
  202. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  203. Call ReturnKey.vbs > nul
  204. if exist ReturnKey.vbs del ReturnKey.vbs
  205. goto :eof
复制代码

TOP

此Sleep非彼Sleep

TOP

这里使用的Sleep最低延时20Ms

TOP

曾经写的一个动画
  1. @echo off
  2. call :Sleep_Installs
  3. set N1=     ■■■    ■■■       ■■■       ■■■■■■■    ■■■■■■■
  4. set N2=       ■        ■       ■      ■       ■         ■     ■          ■
  5. set N3=       ■        ■     ■          ■     ■          ■    ■
  6. set N4=       ■        ■    ■            ■    ■         ■     ■     ■
  7. set N5=       ■■■■■■    ■            ■    ■■■■■■      ■■■■
  8. set N6=       ■        ■    ■            ■    ■                ■     ■
  9. set N7=       ■        ■     ■          ■     ■                ■
  10. set N8=       ■        ■       ■      ■       ■                ■          ■
  11. set N9=     ■■■    ■■■       ■■■       ■■■            ■■■■■■■
  12. Mode Con: Cols=80 Lines=30
  13. Rem Hope Text Art 片头
  14. call :Echo
  15. call :Sleep 20
  16. set "N1=%N1:■=回%"
  17. call :Echo
  18. call :Sleep 20
  19. set "N2=%N2:■=回%"
  20. call :Echo
  21. call :Sleep 20
  22. set "N3=%N3:■=回%"
  23. call :Echo
  24. call :Sleep 20
  25. set "N4=%N4:■=回%"
  26. call :Echo
  27. call :Sleep 20
  28. set "N5=%N5:■=回%"
  29. call :Echo
  30. call :Sleep 20
  31. set "N6=%N6:■=回%"
  32. call :Echo
  33. call :Sleep 20
  34. set "N7=%N7:■=回%"
  35. call :Echo
  36. call :Sleep 20
  37. set "N8=%N8:■=回%"
  38. call :Echo
  39. call :Sleep 20
  40. set "N9=%N9:■=回%"
  41. call :Echo
  42. call :Sleep 20
  43. set "N1=%N1:回=@%"
  44. call :Echo
  45. call :Sleep 20
  46. set "N2=%N2:回=@%"
  47. call :Echo
  48. call :Sleep 20
  49. set "N3=%N3:回=@%"
  50. call :Echo
  51. call :Sleep 20
  52. set "N4=%N4:回=@%"
  53. call :Echo
  54. call :Sleep 20
  55. set "N5=%N5:回=@%"
  56. call :Echo
  57. call :Sleep 20
  58. set "N6=%N6:回=@%"
  59. call :Echo
  60. call :Sleep 20
  61. set "N7=%N7:回=@%"
  62. call :Echo
  63. call :Sleep 20
  64. set "N8=%N8:回=@%"
  65. call :Echo
  66. call :Sleep 20
  67. set "N9=%N9:回=@%"
  68. call :Echo
  69. call :Sleep 20
  70. set "N1=%N1:@=∷%"
  71. call :Echo
  72. call :Sleep 20
  73. set "N2=%N2:@=∷%"
  74. call :Echo
  75. call :Sleep 20
  76. set "N3=%N3:@=∷%"
  77. call :Echo
  78. call :Sleep 20
  79. set "N4=%N4:@=∷%"
  80. call :Echo
  81. call :Sleep 20
  82. set "N5=%N5:@=∷%"
  83. call :Echo
  84. call :Sleep 20
  85. set "N6=%N6:@=∷%"
  86. call :Echo
  87. call :Sleep 20
  88. set "N7=%N7:@=∷%"
  89. call :Echo
  90. call :Sleep 20
  91. set "N8=%N8:@=∷%"
  92. call :Echo
  93. call :Sleep 20
  94. set "N9=%N9:@=∷%"
  95. call :Echo
  96. call :Sleep 20
  97. set "N1=%N1:∷=□%"
  98. call :Echo
  99. call :Sleep 20
  100. set "N2=%N2:∷=□%"
  101. call :Echo
  102. call :Sleep 20
  103. set "N3=%N3:∷=□%"
  104. call :Echo
  105. call :Sleep 20
  106. set "N4=%N4:∷=□%"
  107. call :Echo
  108. call :Sleep 20
  109. set "N5=%N5:∷=□%"
  110. call :Echo
  111. call :Sleep 20
  112. set "N6=%N6:∷=□%"
  113. call :Echo
  114. call :Sleep 20
  115. set "N7=%N7:∷=□%"
  116. call :Echo
  117. call :Sleep 20
  118. set "N8=%N8:∷=□%"
  119. call :Echo
  120. call :Sleep 20
  121. set "N9=%N9:∷=□%"
  122. call :Echo
  123. call :Sleep 20
  124. set "N1=%N1:□=_/%"
  125. call :Echo
  126. call :Sleep 20
  127. set "N2=%N2:□=_/%"
  128. call :Echo
  129. call :Sleep 20
  130. set "N3=%N3:□=_/%"
  131. call :Echo
  132. call :Sleep 20
  133. set "N4=%N4:□=_/%"
  134. call :Echo
  135. call :Sleep 20
  136. set "N5=%N5:□=_/%"
  137. call :Echo
  138. call :Sleep 20
  139. set "N6=%N6:□=_/%"
  140. call :Echo
  141. call :Sleep 20
  142. set "N7=%N7:□=_/%"
  143. call :Echo
  144. call :Sleep 20
  145. set "N8=%N8:□=_/%"
  146. call :Echo
  147. call :Sleep 20
  148. set "N9=%N9:□=_/%"
  149. call :Echo
  150. call :Sleep 20
  151. set "N1=%N1:_/=  %"
  152. call :Echo
  153. call :Sleep 20
  154. set "N2=%N2:_/=  %"
  155. call :Echo
  156. call :Sleep 20
  157. set "N3=%N3:_/=  %"
  158. call :Echo
  159. call :Sleep 20
  160. set "N4=%N4:_/=  %"
  161. call :Echo
  162. call :Sleep 20
  163. set "N5=%N5:_/=  %"
  164. call :Echo
  165. call :Sleep 20
  166. set "N6=%N6:_/=  %"
  167. call :Echo
  168. call :Sleep 20
  169. set "N7=%N7:_/=  %"
  170. call :Echo
  171. call :Sleep 20
  172. set "N8=%N8:_/=  %"
  173. call :Echo
  174. call :Sleep 20
  175. set "N9=%N9:_/=  %"
  176. call :Echo_2
  177. call :Sleep 20
  178. pause>nul
  179. :Echo
  180. color 1f
  181. Mode Con: Cols=80 Lines=30
  182. cls
  183. for /l %%i in (1,1,8) do echo.
  184. echo.%N1%
  185. echo.%N2%
  186. echo.%N3%
  187. echo.%N4%
  188. echo.%N5%
  189. echo.%N6%
  190. echo.%N7%
  191. echo.%N8%
  192. echo.%N9%
  193. for /l %%i in (1,1,5) do echo.
  194. echo.                                      HOPE
  195. goto :eof
  196. :Echo_2
  197. color 1f
  198. Mode Con: Cols=80 Lines=30
  199. cls
  200. for /l %%i in (1,1,8) do echo.
  201. echo.%N1%
  202. echo.%N2%
  203. echo.%N3%
  204. echo.%N4%
  205. echo.%N5%
  206. echo.%N6%
  207. echo.%N7%
  208. echo.%N8%
  209. echo.%N9%
  210. goto :eof
  211. :Sleep_Installs
  212. (
  213. echo.-----BEGIN CERTIFICATE-----
  214. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  215. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  216. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  217. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  218. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  219. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  220. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  221. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  222. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  223. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  224. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  225. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  226. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  227. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  228. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  229. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  230. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  231. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  232. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  233. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  234. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  235. echo.AAAAAAAAAAAAAAAAAAAAAA==
  236. echo.-----END CERTIFICATE-----
  237. ) > Sleep.com
  238. Certutil -Decode Sleep.com Sleep.exe > nul
  239. Certutil -Decode -f Sleep.com Sleep.com > nul
  240. goto :eof
  241. :Sleep
  242. if exist Sleep.exe (
  243. Sleep.exe %1
  244. goto :eof
  245. )
  246. if not exist Sleep.exe if exist Sleep.com (
  247. Sleep.com %1
  248. goto :eof
  249. )
  250. if not exist Sleep.exe if not exist Sleep.com (
  251. echo.Wscript.Sleep %1 > Sleep.vbs
  252. cscript //nologo Sleep.vbs
  253. goto :eof
  254. )
复制代码

TOP

版本1.0.0005
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. title Hope计时器
  30. set Error=0
  31. cls
  32. echo.
  33. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  34. echo.
  35. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  36. call :get_key
  37. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  38. if /i "!key!"=="q" (
  39. set /a Ms_2+=3600000
  40. set /a H+=1
  41. )
  42. if /i "!key!"=="w" (
  43. set /a Ms_2-=3600000
  44. set /a H-=1
  45. )
  46. if /i "!key!"=="e" (
  47. set /a Ms_2+=60000
  48. set /a Min+=1
  49. )
  50. if /i "!key!"=="r" (
  51. set /a Ms_2-=60000
  52. set /a Min-=1
  53. )
  54. if /i "!key!"=="t" (
  55. set /a Ms_2+=1000
  56. set /a S+=1
  57. )
  58. if /i "!key!"=="y" (
  59. set /a Ms_2-=1000
  60. set /a S-=1
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. )
  66. if %S% Lss 0 (
  67. if %Min% Geq 0 if %H% Geq 0 (
  68. set /a Min-=1&set /a S+=60
  69. )
  70. if %Min% Leq 0 if %H% Leq 0 (
  71. echo.
  72. echo.    ^>^> 算数错误!
  73. call :Vbs_Sleep 100
  74. @goto :Restart
  75. )
  76. )
  77. if %Min% Lss 0 (
  78. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  79. if %H% Leq 0 (
  80. echo.
  81. echo.    ^>^> 算数错误!
  82. call :Vbs_Sleep 100
  83. @goto :Restart
  84. )
  85. )
  86. if %H% Lss 0 (
  87. echo.
  88. echo.    ^>^> 算数错误!
  89. call :Vbs_Sleep 100
  90. @goto :Restart
  91. )
  92. if %Ms_2% Gtr 200000000 (
  93. echo.
  94. echo.    ^>^> 算数错误!
  95. call :Vbs_Sleep 100
  96. @goto :Restart
  97. )
  98. if %S% Geq 60 set /a Min+=1&set S=0
  99. if %Min% Geq 60 set /a H+=1&set Min=0
  100. if /i "!key!"=="u" (
  101. @goto :Start
  102. )
  103. if /i "!valid_key!" equ "0" goto :Main
  104. :Error
  105. color 1f
  106. cls
  107. echo.
  108. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  109. echo.
  110. echo.    ^>^> 正在帮您恢复
  111. call :Sleep_Installs
  112. goto :Restart
  113. :Start
  114. set Error=0
  115. cls
  116. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  117. echo.
  118. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
  119. echo.
  120. echo.    ^>^> Ctrl+C暂停或退出...
  121. call :Sleep 100
  122. if %Error%==1 goto :Error
  123. set /a Ms+=100
  124. if %Ms%==1000 set /a S_2+=1&set Ms=0
  125. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  126. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  127. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  128. if /i "!valid_key!" equ "0" goto :Start
  129. :End
  130. cls
  131. color 4e
  132. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  133. Call :Msg "时间到" vbExclamation "Hope计时器"
  134. color 0f
  135. @goto :Restart
  136. :Vbs_Sleep
  137. echo.Wscript.Sleep %1 > Sleep.vbs
  138. call Sleep.vbs > nul
  139. if exist ReturnKey.vbs del ReturnKey.vbs
  140. @goto :eof
  141. :Sleep_Installs
  142. mode con cols=68 lines=5
  143. color 0f
  144. (
  145. echo.-----BEGIN CERTIFICATE-----
  146. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  147. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  148. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  149. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  150. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  151. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  152. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  154. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  155. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  156. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  157. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  158. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  159. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  160. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  161. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  162. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  163. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  164. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  165. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  166. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  167. echo.AAAAAAAAAAAAAAAAAAAAAA==
  168. echo.-----END CERTIFICATE-----
  169. ) > Sleep.com
  170. Certutil -Decode Sleep.com Sleep.exe > nul
  171. Certutil -Decode -f Sleep.com Sleep.com > nul
  172. goto :eof
  173. :Sleep
  174. set Error=0
  175. if exist Sleep.exe (
  176. Sleep.exe %1
  177. goto :eof
  178. )
  179. if not exist Sleep.exe if exist Sleep.com (
  180. Sleep.com %1
  181. goto :eof
  182. )
  183. if not exist Sleep.exe if not exist Sleep.com (
  184. set Error=1
  185. goto :eof
  186. )
  187. :get_key
  188. rem 用法:call :get_key
  189. set "key="
  190.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  191.   set "key=%key:~-1%"
  192.   set "valid_key=0"
  193. goto :eof
  194. :Msg
  195. Rem 用法: Call :Msg "Text" [buttons] "Title"
  196. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  197. Call ReturnKey.vbs > nul
  198. if exist ReturnKey.vbs del ReturnKey.vbs
  199. goto :eof
复制代码

TOP

回复 8# HOPE2021


    特别卡
    点我查看视频
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 9# cmd1152
看上去是特别卡,实际上每秒运行十次,下一个版本加上毫秒

TOP

版本1.0.0006
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. cls
  9. echo.
  10. echo.
  11. echo.                                HOPE
  12. color 0f
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. title Hope计时器
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. title Hope计时器
  30. set Error=0
  31. cls
  32. echo.
  33. echo.    ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
  34. echo.
  35. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  36. call :get_key
  37. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  38. if /i "!key!"=="q" (
  39. set /a Ms_2+=3600000
  40. set /a H+=1
  41. )
  42. if /i "!key!"=="w" (
  43. set /a Ms_2-=3600000
  44. set /a H-=1
  45. )
  46. if /i "!key!"=="e" (
  47. set /a Ms_2+=60000
  48. set /a Min+=1
  49. )
  50. if /i "!key!"=="r" (
  51. set /a Ms_2-=60000
  52. set /a Min-=1
  53. )
  54. if /i "!key!"=="t" (
  55. set /a Ms_2+=1000
  56. set /a S+=1
  57. )
  58. if /i "!key!"=="y" (
  59. set /a Ms_2-=1000
  60. set /a S-=1
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. )
  66. if %S% Lss 0 (
  67. if %Min% Geq 0 if %H% Geq 0 (
  68. set /a Min-=1&set /a S+=60
  69. )
  70. if %Min% Leq 0 if %H% Leq 0 (
  71. echo.
  72. echo.    ^>^> 算数错误!
  73. call :Vbs_Sleep 100
  74. @goto :Restart
  75. )
  76. )
  77. if %Min% Lss 0 (
  78. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  79. if %H% Leq 0 (
  80. echo.
  81. echo.    ^>^> 算数错误!
  82. call :Vbs_Sleep 100
  83. @goto :Restart
  84. )
  85. )
  86. if %H% Lss 0 (
  87. echo.
  88. echo.    ^>^> 算数错误!
  89. call :Vbs_Sleep 100
  90. @goto :Restart
  91. )
  92. if %Ms_2% Gtr 200000000 (
  93. echo.
  94. echo.    ^>^> 算数错误!
  95. call :Vbs_Sleep 100
  96. @goto :Restart
  97. )
  98. if %S% Geq 60 set /a Min+=1&set S=0
  99. if %Min% Geq 60 set /a H+=1&set Min=0
  100. if /i "!key!"=="u" (
  101. @goto :Start
  102. )
  103. if /i "!valid_key!" equ "0" goto :Main
  104. :Error
  105. color 1f
  106. cls
  107. echo.
  108. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  109. echo.
  110. echo.    ^>^> 正在帮您恢复
  111. call :Sleep_Installs
  112. goto :Restart
  113. :Start
  114. set Error=0
  115. cls
  116. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  117. echo.
  118. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
  119. echo.
  120. echo.    ^>^> Ctrl+C暂停或退出...
  121. call :Sleep 100
  122. if %Error%==1 goto :Error
  123. set /a Ms+=100
  124. if %Ms%==1000 set /a S_2+=1&set Ms=0
  125. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  126. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  127. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  128. if /i "!valid_key!" equ "0" goto :Start
  129. :End
  130. cls
  131. color 4e
  132. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  133. Call :Msg "时间到" vbExclamation "Hope计时器"
  134. color 0f
  135. @goto :Restart
  136. :Vbs_Sleep
  137. echo.Wscript.Sleep %1 > Sleep.vbs
  138. call Sleep.vbs > nul
  139. if exist ReturnKey.vbs del ReturnKey.vbs
  140. @goto :eof
  141. :Sleep_Installs
  142. mode con cols=68 lines=5
  143. color 0f
  144. (
  145. echo.-----BEGIN CERTIFICATE-----
  146. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  147. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  148. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  149. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  150. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  151. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  152. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  154. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  155. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  156. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  157. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  158. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  159. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  160. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  161. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  162. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  163. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  164. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  165. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  166. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  167. echo.AAAAAAAAAAAAAAAAAAAAAA==
  168. echo.-----END CERTIFICATE-----
  169. ) > Sleep.com
  170. Certutil -Decode Sleep.com Sleep.exe > nul
  171. Certutil -Decode -f Sleep.com Sleep.com > nul
  172. goto :eof
  173. :Sleep
  174. set Error=0
  175. if exist Sleep.exe (
  176. Sleep.exe %1
  177. goto :eof
  178. )
  179. if not exist Sleep.exe if exist Sleep.com (
  180. Sleep.com %1
  181. goto :eof
  182. )
  183. if not exist Sleep.exe if not exist Sleep.com (
  184. set Error=1
  185. goto :eof
  186. )
  187. :get_key
  188. rem 用法:call :get_key
  189. set "key="
  190.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  191.   set "key=%key:~-1%"
  192.   set "valid_key=0"
  193. goto :eof
  194. :Msg
  195. Rem 用法: Call :Msg "Text" [buttons] "Title"
  196. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  197. Call ReturnKey.vbs > nul
  198. if exist ReturnKey.vbs del ReturnKey.vbs
  199. goto :eof
复制代码

TOP

版本1.0.0007
  1. @echo off
  2. endlocal
  3. setlocal enabledelayedexpansion
  4. chcp 936 > nul
  5. Rem By Hope2021
  6. title Hope计时器
  7. mode con cols=68 lines=5
  8. color f9
  9. cls
  10. echo.
  11. echo.
  12. echo.                                HOPE
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. color 0f
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. title Hope计时器
  30. set Error=0
  31. cls
  32. echo.
  33. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  34. echo.
  35. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  36. call :get_key
  37. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  38. if /i "!key!"=="q" (
  39. set /a Ms_2+=3600000
  40. set /a H+=1
  41. )
  42. if /i "!key!"=="w" (
  43. set /a Ms_2-=3600000
  44. set /a H-=1
  45. )
  46. if /i "!key!"=="e" (
  47. set /a Ms_2+=60000
  48. set /a Min+=1
  49. )
  50. if /i "!key!"=="r" (
  51. set /a Ms_2-=60000
  52. set /a Min-=1
  53. )
  54. if /i "!key!"=="t" (
  55. set /a Ms_2+=1000
  56. set /a S+=1
  57. )
  58. if /i "!key!"=="y" (
  59. set /a Ms_2-=1000
  60. set /a S-=1
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. )
  66. if %S% Lss 0 (
  67. if %Min% Geq 0 if %H% Geq 0 (
  68. set /a Min-=1&set /a S+=60
  69. )
  70. if %Min% Leq 0 if %H% Leq 0 (
  71. echo.
  72. echo.    ^>^> 算数错误!
  73. call :Vbs_Sleep 100
  74. @goto :Restart
  75. )
  76. )
  77. if %Min% Lss 0 (
  78. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  79. if %H% Leq 0 (
  80. echo.
  81. echo.    ^>^> 算数错误!
  82. call :Vbs_Sleep 100
  83. @goto :Restart
  84. )
  85. )
  86. if %H% Lss 0 (
  87. echo.
  88. echo.    ^>^> 算数错误!
  89. call :Vbs_Sleep 100
  90. @goto :Restart
  91. )
  92. if %Ms_2% Gtr 200000000 (
  93. echo.
  94. echo.    ^>^> 算数错误!
  95. call :Vbs_Sleep 100
  96. @goto :Restart
  97. )
  98. if %S% Geq 60 set /a Min+=1&set S=0
  99. if %Min% Geq 60 set /a H+=1&set Min=0
  100. if /i "!key!"=="u" (
  101. @goto :Start
  102. )
  103. if /i "!valid_key!" equ "0" goto :Main
  104. :Error
  105. color 1f
  106. cls
  107. echo.
  108. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  109. echo.
  110. echo.    ^>^> 正在帮您恢复
  111. call :Sleep_Installs
  112. goto :Restart
  113. :Start
  114. set Error=0
  115. cls
  116. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  117. echo.
  118. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
  119. echo.
  120. echo.    ^>^> Ctrl+C暂停或退出...
  121. call :Sleep 100
  122. if %Error%==1 goto :Error
  123. set /a Ms+=100
  124. if %Ms%==1000 set /a S_2+=1&set Ms=0
  125. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  126. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  127. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  128. if /i "!valid_key!" equ "0" goto :Start
  129. :End
  130. cls
  131. color 4e
  132. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  133. Call :Msg "时间到" vbExclamation "Hope计时器"
  134. color 0f
  135. @goto :Restart
  136. :Vbs_Sleep
  137. echo.Wscript.Sleep %1 > Sleep.vbs
  138. call Sleep.vbs > nul
  139. if exist ReturnKey.vbs del ReturnKey.vbs
  140. @goto :eof
  141. :Sleep_Installs
  142. mode con cols=68 lines=5
  143. color 0f
  144. (
  145. echo.-----BEGIN CERTIFICATE-----
  146. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  147. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  148. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  149. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  150. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  151. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  152. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  154. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  155. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  156. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  157. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  158. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  159. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  160. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  161. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  162. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  163. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  164. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  165. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  166. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  167. echo.AAAAAAAAAAAAAAAAAAAAAA==
  168. echo.-----END CERTIFICATE-----
  169. ) > Sleep.com
  170. Certutil -Decode Sleep.com Sleep.exe > nul
  171. Certutil -Decode -f Sleep.com Sleep.com > nul
  172. goto :eof
  173. :Sleep
  174. set Error=0
  175. if exist Sleep.exe (
  176. Sleep.exe %1
  177. goto :eof
  178. )
  179. if not exist Sleep.exe if exist Sleep.com (
  180. Sleep.com %1
  181. goto :eof
  182. )
  183. if not exist Sleep.exe if not exist Sleep.com (
  184. set Error=1
  185. goto :eof
  186. )
  187. :get_key
  188. rem 用法:call :get_key
  189. set "key="
  190.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  191.   set "key=%key:~-1%"
  192.   set "valid_key=0"
  193. goto :eof
  194. :Msg
  195. Rem 用法: Call :Msg "Text" [buttons] "Title"
  196. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  197. Call ReturnKey.vbs > nul
  198. if exist ReturnKey.vbs del ReturnKey.vbs
  199. goto :eof
复制代码

TOP

您的视频我看过了,在我的电脑上并不卡。
BATHOMEPNG\Hope计时器录像.rar

TOP

版本1.0.0008
  1. @echo off
  2. mode con cols=68 lines=5
  3. color f9
  4. endlocal
  5. setlocal enabledelayedexpansion
  6. chcp 936 > nul
  7. Rem By Hope2021
  8. title Hope计时器
  9. cls
  10. echo.
  11. echo.
  12. echo.                                HOPE
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. color 0f
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. mode con cols=68 lines=7
  30. title Hope计时器
  31. set Error=0
  32. cls
  33. echo.
  34. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  35. echo.
  36. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  37. echo.
  38. echo.  P 打开计划程序
  39. call :get_key
  40. call :Settings_Time
  41. if /i "!key!"=="P" (
  42. set St_1=10001
  43. set En_1=10010
  44. mode con cols=68 lines=34
  45. @goto :Task
  46. )
  47. if /i "!key!"=="u" (
  48. mode con cols=68 lines=5
  49. @goto :Start
  50. )
  51. if /i "!key!"=="i" (
  52. exit
  53. )
  54. if /i "!valid_key!" equ "0" goto :Main
  55. :Task
  56. Md Tasks >nul 2>nul
  57. cls
  58. title Hope计时器[计划程序]
  59. set Error=0
  60. echo.
  61. echo.  Hope计时器[计划程序]
  62. set /p Str=--------------------------------------------------------------------<nul
  63. echo.
  64. echo.    ^>^> Q 新建计划   W 使用计划   D 删除计划   E 返回菜单   R 退出
  65. if not exist Tasks\*.Htd (
  66. echo.
  67. echo.    ^>^> 当前没有计划
  68. set /p Str=--------------------------------------------------------------------<nul
  69. echo.
  70. echo.
  71. )
  72. if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
  73. if exist Tasks\*.Htd (
  74. cd Tasks
  75. echo.
  76. echo.    ^>^> 当前计划列表
  77. set /p Str=--------------------------------------------------------------------<nul
  78. echo.
  79. echo.
  80. for /f %%i in ('dir /b *.Htd') do (
  81.     echo.    ^>^> 编号:%%~ni
  82. )
  83. echo.
  84. cd..
  85. )
  86. )
  87. call :get_key
  88. if /i "!key!"=="E" (
  89. @goto :Main
  90. )
  91. if /i "!key!"=="R" (
  92. exit
  93. )
  94. if /i "!key!"=="Q" (
  95. @goto :New
  96. )
  97. if /i "!key!"=="W" (
  98. @goto :Open
  99. )
  100. if /i "!valid_key!" equ "0" @goto :Task
  101. :Open
  102. if exist Tasks\*.Htd (
  103. set "Content= "
  104. set /p Content=    ^>^> 请输入计划编号:
  105. goto Open_2
  106. ) else cd..&@goto :Task
  107. :Del
  108. if exist Tasks\*.Htd (
  109. set "Content= "
  110. set /p Content=    ^>^> 请输入计划编号:
  111. goto Del_2
  112. ) else cd..&@goto :Task
  113. :Del_2
  114. cd Tasks
  115. if exist %Content%.Htd (
  116. del %Content%.Htd
  117. cd..
  118. goto Task
  119. ) else cd..&goto Task
  120. :Open_2
  121. cd Tasks
  122. if exist %Content%.Htd (
  123. call :Read %Content%
  124. cd..
  125. mode con cols=68 lines=5
  126. @goto :Start
  127. ) else cd..&goto Task
  128. :New
  129. cd Tasks
  130. < Htd.Hdat (
  131. set /p Num=
  132. )
  133. set /a Num+=1
  134. echo.%Num% > Htd.Hdat
  135. cd..
  136. echo.
  137. echo.    ^>^> 新建了计划:%Num%
  138. echo.
  139. set H=0
  140. set Min=0
  141. set S=0
  142. set H_2=0
  143. set Min_2=0
  144. set S_2=0
  145. set Ms=0
  146. set Ms_2=0
  147. call :Vbs_Sleep 1000
  148. @goto :New_2
  149. :Read
  150. < %1.Htd (
  151. set /p H=
  152. set /p Min=
  153. set /p S=
  154. set /p Ms_2=
  155. )
  156. @goto :eof
  157. :New_2
  158. cls
  159. echo.
  160. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  161. echo.
  162. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U 完成计划
  163. echo.
  164. call :get_key
  165. call :Settings_Time
  166. if /i "!key!"=="U" (
  167. (
  168. echo.%H%
  169. echo.%Min%
  170. echo.%S%
  171. echo.%Ms_2%
  172. ) > Tasks\%Num%.Htd
  173. @goto :Task
  174. )
  175. if /i "!valid_key!" equ "0" @goto :New_2
  176. :Error
  177. color 1f
  178. cls
  179. echo.
  180. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  181. echo.
  182. echo.    ^>^> 正在帮您恢复
  183. call :Sleep_Installs
  184. goto :Restart
  185. :Start
  186. set Error=0
  187. cls
  188. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  189. echo.
  190. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
  191. echo.
  192. echo.    ^>^> Ctrl+C暂停或退出...
  193. call :Sleep 100
  194. if %Error%==1 goto :Error
  195. set /a Ms+=100
  196. if %Ms%==1000 set /a S_2+=1&set Ms=0
  197. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  198. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  199. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  200. if /i "!valid_key!" equ "0" goto :Start
  201. :End
  202. cls
  203. color 4e
  204. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  205. Call :Msg "时间到" vbExclamation "Hope计时器"
  206. color 0f
  207. @goto :Restart
  208. :Vbs_Sleep
  209. echo.Wscript.Sleep %1 > Sleep.vbs
  210. call Sleep.vbs > nul
  211. if exist ReturnKey.vbs del ReturnKey.vbs
  212. @goto :eof
  213. :Sleep_Installs
  214. mode con cols=68 lines=5
  215. color 0f
  216. (
  217. echo.-----BEGIN CERTIFICATE-----
  218. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  219. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  220. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  221. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  222. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  223. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  224. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  225. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  226. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  227. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  228. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  229. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  230. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  231. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  232. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  233. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  234. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  235. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  236. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  237. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  238. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  239. echo.AAAAAAAAAAAAAAAAAAAAAA==
  240. echo.-----END CERTIFICATE-----
  241. ) > Sleep.com
  242. Certutil -Decode Sleep.com Sleep.exe > nul
  243. Certutil -Decode -f Sleep.com Sleep.com > nul
  244. goto :eof
  245. :Sleep
  246. set Error=0
  247. if exist Sleep.exe (
  248. Sleep.exe %1
  249. goto :eof
  250. )
  251. if not exist Sleep.exe if exist Sleep.com (
  252. Sleep.com %1
  253. goto :eof
  254. )
  255. if not exist Sleep.exe if not exist Sleep.com (
  256. set Error=1
  257. goto :eof
  258. )
  259. :get_key
  260. rem 用法:call :get_key
  261. set "key="
  262.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  263.   set "key=%key:~-1%"
  264.   set "valid_key=0"
  265. goto :eof
  266. :Msg
  267. Rem 用法: Call :Msg "Text" [buttons] "Title"
  268. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  269. Call ReturnKey.vbs > nul
  270. if exist ReturnKey.vbs del ReturnKey.vbs
  271. goto :eof
  272. :Settings_Time
  273. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  274. if /i "!key!"=="q" (
  275. set /a Ms_2+=3600000
  276. set /a H+=1
  277. )
  278. if /i "!key!"=="w" (
  279. set /a Ms_2-=3600000
  280. set /a H-=1
  281. )
  282. if /i "!key!"=="e" (
  283. set /a Ms_2+=60000
  284. set /a Min+=1
  285. )
  286. if /i "!key!"=="r" (
  287. set /a Ms_2-=60000
  288. set /a Min-=1
  289. )
  290. if /i "!key!"=="t" (
  291. set /a Ms_2+=1000
  292. set /a S+=1
  293. )
  294. if /i "!key!"=="y" (
  295. set /a Ms_2-=1000
  296. set /a S-=1
  297. )
  298. )
  299. if %S% Lss 0 (
  300. if %Min% Geq 0 if %H% Geq 0 (
  301. set /a Min-=1&set /a S+=60
  302. )
  303. if %Min% Leq 0 if %H% Leq 0 (
  304. echo.
  305. echo.    ^>^> 算数错误!
  306. call :Vbs_Sleep 100
  307. @goto :Restart
  308. )
  309. )
  310. if %Min% Lss 0 (
  311. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  312. if %H% Leq 0 (
  313. echo.
  314. echo.    ^>^> 算数错误!
  315. call :Vbs_Sleep 100
  316. @goto :Restart
  317. )
  318. )
  319. if %H% Lss 0 (
  320. echo.
  321. echo.    ^>^> 算数错误!
  322. call :Vbs_Sleep 100
  323. @goto :Restart
  324. )
  325. if %Ms_2% Gtr 200000000 (
  326. echo.
  327. echo.    ^>^> 算数错误!
  328. call :Vbs_Sleep 100
  329. @goto :Restart
  330. )
  331. if %S% Geq 60 set /a Min+=1&set S=0
  332. if %Min% Geq 60 set /a H+=1&set Min=0
复制代码

TOP

本帖最后由 HOPE2021 于 2021-8-13 10:51 编辑

有重大谬误,请停止使用!
版本1.0.0009
  1. @echo off
  2. mode con cols=68 lines=5
  3. color f9
  4. endlocal
  5. setlocal enabledelayedexpansion
  6. chcp 936 > nul
  7. Rem By Hope2021
  8. title Hope计时器
  9. cls
  10. echo.
  11. echo.
  12. echo.                                HOPE
  13. call :Vbs_Sleep 1000
  14. call :Sleep_Installs
  15. @goto :Restart
  16. :Restart
  17. color 0f
  18. cls
  19. set H=0
  20. set Min=0
  21. set S=0
  22. set H_2=0
  23. set Min_2=0
  24. set S_2=0
  25. set Ms=0
  26. set Ms_2=0
  27. @goto :Main
  28. :Main
  29. mode con cols=68 lines=7
  30. title Hope计时器
  31. set Error=0
  32. cls
  33. echo.
  34. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  35. echo.
  36. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  37. echo.
  38. echo.  P 打开计划程序
  39. call :get_key
  40. call :Settings_Time
  41. if /i "!key!"=="P" (
  42. set St_1=10001
  43. set En_1=10010
  44. mode con cols=68 lines=34
  45. @goto :Task
  46. )
  47. if /i "!key!"=="u" (
  48. mode con cols=68 lines=5
  49. @goto :Start
  50. )
  51. if /i "!key!"=="i" (
  52. exit
  53. )
  54. if /i "!valid_key!" equ "0" goto :Main
  55. :Task
  56. Md Tasks >nul 2>nul
  57. cls
  58. title Hope计时器[计划程序]
  59. set Error=0
  60. echo.
  61. echo.  Hope计时器[计划程序]
  62. set /p Str=--------------------------------------------------------------------<nul
  63. echo.
  64. echo.    ^>^> Q 新建计划   W 使用计划   D 删除计划   E 返回菜单   R 退出
  65. if not exist Tasks\*.Htd (
  66. echo.
  67. echo.    ^>^> 当前没有计划
  68. set /p Str=--------------------------------------------------------------------<nul
  69. echo.
  70. echo.
  71. )
  72. if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
  73. if exist Tasks\*.Htd (
  74. cd Tasks
  75. echo.
  76. echo.    ^>^> 当前计划列表
  77. set /p Str=--------------------------------------------------------------------<nul
  78. echo.
  79. echo.
  80. for /f %%i in ('dir /b *.Htd') do (
  81. for /f "skip=4" %%j in (%%~ni.Htd) do echo.    ^>^> 编号:%%~ni  备注:%%j
  82. )
  83. echo.
  84. cd..
  85. )
  86. )
  87. call :get_key
  88. if /i "!key!"=="E" (
  89. @goto :Main
  90. )
  91. if /i "!key!"=="R" (
  92. exit
  93. )
  94. if /i "!key!"=="Q" (
  95. @goto :New
  96. )
  97. if /i "!key!"=="W" (
  98. @goto :Open
  99. )
  100. if /i "!valid_key!" equ "0" @goto :Task
  101. :Open
  102. if exist Tasks\*.Htd (
  103. set "Content= "
  104. set /p Content=    ^>^> 请输入计划编号:
  105. goto Open_2
  106. ) else cd..&@goto :Task
  107. :Del
  108. if exist Tasks\*.Htd (
  109. set "Content= "
  110. set /p Content=    ^>^> 请输入计划编号:
  111. goto Del_2
  112. ) else cd..&@goto :Task
  113. :Del_2
  114. cd Tasks
  115. if exist %Content%.Htd (
  116. del %Content%.Htd
  117. cd..
  118. goto Task
  119. ) else cd..&goto Task
  120. :Open_2
  121. cd Tasks
  122. if exist %Content%.Htd (
  123. call :Read %Content%
  124. cd..
  125. mode con cols=68 lines=5
  126. @goto :Start
  127. ) else cd..&goto Task
  128. :New
  129. cd Tasks
  130. < Htd.Hdat (
  131. set /p Num=
  132. )
  133. set /a Num+=1
  134. echo.%Num% > Htd.Hdat
  135. cd..
  136. echo.
  137. echo.    ^>^> 新建计划:%Num%
  138. echo.
  139. set "Content= "
  140. set /p Content=    ^>^> 备注:
  141. echo.
  142. set "Content=%Content:>=^>%"
  143. set "Content=%Content:<=^<%"
  144. set "Content=%Content:|=^|%"
  145. set H=0
  146. set Min=0
  147. set S=0
  148. set H_2=0
  149. set Min_2=0
  150. set S_2=0
  151. set Ms=0
  152. set Ms_2=0
  153. call :Vbs_Sleep 1000
  154. @goto :New_2
  155. :Read
  156. < %1.Htd (
  157. set /p H=
  158. set /p Min=
  159. set /p S=
  160. set /p Ms_2=
  161. set /p Content=
  162. )
  163. @goto :eof
  164. :New_2
  165. cls
  166. echo.
  167. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  168. echo.
  169. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U 完成计划
  170. echo.
  171. call :get_key
  172. call :Settings_Time
  173. if /i "!key!"=="U" (
  174. (
  175. echo.%H%
  176. echo.%Min%
  177. echo.%S%
  178. echo.%Ms_2%
  179. echo.%Content%
  180. ) > Tasks\%Num%.Htd
  181. @goto :Task
  182. )
  183. if /i "!valid_key!" equ "0" @goto :New_2
  184. :Error
  185. color 1f
  186. cls
  187. echo.
  188. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  189. echo.
  190. echo.    ^>^> 正在帮您恢复
  191. call :Sleep_Installs
  192. goto :Restart
  193. :Start
  194. set Error=0
  195. cls
  196. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  197. echo.
  198. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
  199. echo.
  200. echo.    ^>^> Ctrl+C暂停或退出...
  201. call :Sleep 100
  202. if %Error%==1 goto :Error
  203. set /a Ms+=100
  204. if %Ms%==1000 set /a S_2+=1&set Ms=0
  205. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  206. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  207. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  208. if /i "!valid_key!" equ "0" goto :Start
  209. :End
  210. cls
  211. color 4e
  212. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  213. Call :Msg "时间到" vbExclamation "Hope计时器"
  214. color 0f
  215. @goto :Restart
  216. :Vbs_Sleep
  217. echo.Wscript.Sleep %1 > Sleep.vbs
  218. call Sleep.vbs > nul
  219. if exist ReturnKey.vbs del ReturnKey.vbs
  220. @goto :eof
  221. :Sleep_Installs
  222. mode con cols=68 lines=5
  223. color 0f
  224. (
  225. echo.-----BEGIN CERTIFICATE-----
  226. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  227. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  228. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  229. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  230. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  231. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  232. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  233. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  234. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  235. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  236. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  237. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  238. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  239. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  240. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  241. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  242. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  243. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  244. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  245. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  246. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  247. echo.AAAAAAAAAAAAAAAAAAAAAA==
  248. echo.-----END CERTIFICATE-----
  249. ) > Sleep.com
  250. Certutil -Decode Sleep.com Sleep.exe > nul
  251. Certutil -Decode -f Sleep.com Sleep.com > nul
  252. goto :eof
  253. :Sleep
  254. set Error=0
  255. if exist Sleep.exe (
  256. Sleep.exe %1
  257. goto :eof
  258. )
  259. if not exist Sleep.exe if exist Sleep.com (
  260. Sleep.com %1
  261. goto :eof
  262. )
  263. if not exist Sleep.exe if not exist Sleep.com (
  264. set Error=1
  265. goto :eof
  266. )
  267. :get_key
  268. rem 用法:call :get_key
  269. set "key="
  270.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  271.   set "key=%key:~-1%"
  272.   set "valid_key=0"
  273. goto :eof
  274. :Msg
  275. Rem 用法: Call :Msg "Text" [buttons] "Title"
  276. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  277. Call ReturnKey.vbs > nul
  278. if exist ReturnKey.vbs del ReturnKey.vbs
  279. goto :eof
  280. :Settings_Time
  281. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  282. if /i "!key!"=="q" (
  283. set /a Ms_2+=3600000
  284. set /a H+=1
  285. )
  286. if /i "!key!"=="w" (
  287. set /a Ms_2-=3600000
  288. set /a H-=1
  289. )
  290. if /i "!key!"=="e" (
  291. set /a Ms_2+=60000
  292. set /a Min+=1
  293. )
  294. if /i "!key!"=="r" (
  295. set /a Ms_2-=60000
  296. set /a Min-=1
  297. )
  298. if /i "!key!"=="t" (
  299. set /a Ms_2+=1000
  300. set /a S+=1
  301. )
  302. if /i "!key!"=="y" (
  303. set /a Ms_2-=1000
  304. set /a S-=1
  305. )
  306. )
  307. if %S% Lss 0 (
  308. if %Min% Geq 0 if %H% Geq 0 (
  309. set /a Min-=1&set /a S+=60
  310. )
  311. if %Min% Leq 0 if %H% Leq 0 (
  312. echo.
  313. echo.    ^>^> 算数错误!
  314. call :Vbs_Sleep 100
  315. @goto :Restart
  316. )
  317. )
  318. if %Min% Lss 0 (
  319. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  320. if %H% Leq 0 (
  321. echo.
  322. echo.    ^>^> 算数错误!
  323. call :Vbs_Sleep 100
  324. @goto :Restart
  325. )
  326. )
  327. if %H% Lss 0 (
  328. echo.
  329. echo.    ^>^> 算数错误!
  330. call :Vbs_Sleep 100
  331. @goto :Restart
  332. )
  333. if %Ms_2% Gtr 200000000 (
  334. echo.
  335. echo.    ^>^> 算数错误!
  336. call :Vbs_Sleep 100
  337. @goto :Restart
  338. )
  339. if %S% Geq 60 set /a Min+=1&set S=0
  340. if %Min% Geq 60 set /a H+=1&set Min=0
复制代码

TOP

返回列表