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

有重大谬误,请停止使用!
版本1.0.0010
  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!"=="D" (
  92. @goto :Del
  93. )
  94. if /i "!key!"=="R" (
  95. exit
  96. )
  97. if /i "!key!"=="Q" (
  98. @goto :New
  99. )
  100. if /i "!key!"=="W" (
  101. @goto :Open
  102. )
  103. if /i "!valid_key!" equ "0" @goto :Task
  104. :Open
  105. if exist Tasks\*.Htd (
  106. set "Content= "
  107. set /p Content=    ^>^> 请输入计划编号:
  108. goto Open_2
  109. ) else cd..&@goto :Task
  110. :Del
  111. if exist Tasks\*.Htd (
  112. set "Content= "
  113. set /p Content=    ^>^> 请输入计划编号:
  114. goto Del_2
  115. ) else cd..&@goto :Task
  116. :Del_2
  117. cd Tasks
  118. if exist %Content%.Htd (
  119. del %Content%.Htd
  120. cd..
  121. goto Task
  122. ) else cd..&goto Task
  123. :Open_2
  124. cd Tasks
  125. if exist %Content%.Htd (
  126. call :Read %Content%
  127. cd..
  128. mode con cols=68 lines=5
  129. @goto :Start
  130. ) else cd..&goto Task
  131. :New
  132. cd Tasks
  133. < Htd.Hdat (
  134. set /p Num=
  135. )
  136. set /a Num+=1
  137. echo.%Num% > Htd.Hdat
  138. cd..
  139. echo.
  140. echo.    ^>^> 新建计划:%Num%
  141. echo.
  142. set "Content= "
  143. set /p Content=    ^>^> 备注:
  144. echo.
  145. set "Content=%Content:>=^>%"
  146. set "Content=%Content:<=^<%"
  147. set "Content=%Content:|=^|%"
  148. set H=0
  149. set Min=0
  150. set S=0
  151. set H_2=0
  152. set Min_2=0
  153. set S_2=0
  154. set Ms=0
  155. set Ms_2=0
  156. call :Vbs_Sleep 1000
  157. @goto :New_2
  158. :Read
  159. < %1.Htd (
  160. set /p H=
  161. set /p Min=
  162. set /p S=
  163. set /p Ms_2=
  164. set /p Content=
  165. )
  166. @goto :eof
  167. :New_2
  168. cls
  169. echo.
  170. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  171. echo.
  172. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U 完成计划
  173. echo.
  174. call :get_key
  175. call :Settings_Time
  176. if /i "!key!"=="U" (
  177. (
  178. echo.%H%
  179. echo.%Min%
  180. echo.%S%
  181. echo.%Ms_2%
  182. echo.%Content%
  183. ) > Tasks\%Num%.Htd
  184. @goto :Task
  185. )
  186. if /i "!valid_key!" equ "0" @goto :New_2
  187. :Error
  188. color 1f
  189. cls
  190. echo.
  191. echo.    ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
  192. echo.
  193. echo.    ^>^> 正在帮您恢复
  194. call :Sleep_Installs
  195. goto :Restart
  196. :Start
  197. set Error=0
  198. cls
  199. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  200. echo.
  201. echo.    ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
  202. echo.
  203. echo.    ^>^> Ctrl+C暂停或退出...
  204. call :Sleep 100
  205. if %Error%==1 goto :Error
  206. set /a Ms+=100
  207. if %Ms%==1000 set /a S_2+=1&set Ms=0
  208. if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
  209. if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
  210. if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
  211. if /i "!valid_key!" equ "0" goto :Start
  212. :End
  213. cls
  214. color 4e
  215. title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
  216. Call :Msg "时间到" vbExclamation "Hope计时器"
  217. color 0f
  218. @goto :Restart
  219. :Vbs_Sleep
  220. echo.Wscript.Sleep %1 > Sleep.vbs
  221. call Sleep.vbs > nul
  222. if exist ReturnKey.vbs del ReturnKey.vbs
  223. @goto :eof
  224. :Sleep_Installs
  225. mode con cols=68 lines=5
  226. color 0f
  227. (
  228. echo.-----BEGIN CERTIFICATE-----
  229. echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  230. echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
  231. echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
  232. echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
  233. echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
  234. echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
  235. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  236. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
  237. echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
  238. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  239. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
  240. echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
  241. echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
  242. echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
  243. echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
  244. echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  245. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  246. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  247. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  248. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  249. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  250. echo.AAAAAAAAAAAAAAAAAAAAAA==
  251. echo.-----END CERTIFICATE-----
  252. ) > Sleep.com
  253. Certutil -Decode Sleep.com Sleep.exe > nul
  254. Certutil -Decode -f Sleep.com Sleep.com > nul
  255. goto :eof
  256. :Sleep
  257. set Error=0
  258. if exist Sleep.exe (
  259. Sleep.exe %1
  260. goto :eof
  261. )
  262. if not exist Sleep.exe if exist Sleep.com (
  263. Sleep.com %1
  264. goto :eof
  265. )
  266. if not exist Sleep.exe if not exist Sleep.com (
  267. set Error=1
  268. goto :eof
  269. )
  270. :get_key
  271. rem 用法:call :get_key
  272. set "key="
  273.   for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
  274.   set "key=%key:~-1%"
  275.   set "valid_key=0"
  276. goto :eof
  277. :Msg
  278. Rem 用法: Call :Msg "Text" [buttons] "Title"
  279. echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
  280. Call ReturnKey.vbs > nul
  281. if exist ReturnKey.vbs del ReturnKey.vbs
  282. goto :eof
  283. :Settings_Time
  284. if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
  285. if /i "!key!"=="q" (
  286. set /a Ms_2+=3600000
  287. set /a H+=1
  288. )
  289. if /i "!key!"=="w" (
  290. set /a Ms_2-=3600000
  291. set /a H-=1
  292. )
  293. if /i "!key!"=="e" (
  294. set /a Ms_2+=60000
  295. set /a Min+=1
  296. )
  297. if /i "!key!"=="r" (
  298. set /a Ms_2-=60000
  299. set /a Min-=1
  300. )
  301. if /i "!key!"=="t" (
  302. set /a Ms_2+=1000
  303. set /a S+=1
  304. )
  305. if /i "!key!"=="y" (
  306. set /a Ms_2-=1000
  307. set /a S-=1
  308. )
  309. )
  310. if %S% Lss 0 (
  311. if %Min% Geq 0 if %H% Geq 0 (
  312. set /a Min-=1&set /a S+=60
  313. )
  314. if %Min% Leq 0 if %H% Leq 0 (
  315. echo.
  316. echo.    ^>^> 算数错误!
  317. call :Vbs_Sleep 100
  318. @goto :Restart
  319. )
  320. )
  321. if %Min% Lss 0 (
  322. if %H% Gtr 0 set /a H-=1&set /a Min+=60
  323. if %H% Leq 0 (
  324. echo.
  325. echo.    ^>^> 算数错误!
  326. call :Vbs_Sleep 100
  327. @goto :Restart
  328. )
  329. )
  330. if %H% Lss 0 (
  331. echo.
  332. echo.    ^>^> 算数错误!
  333. call :Vbs_Sleep 100
  334. @goto :Restart
  335. )
  336. if %Ms_2% Gtr 200000000 (
  337. echo.
  338. echo.    ^>^> 算数错误!
  339. call :Vbs_Sleep 100
  340. @goto :Restart
  341. )
  342. if %S% Geq 60 set /a Min+=1&set S=0
  343. if %Min% Geq 60 set /a H+=1&set Min=0
复制代码

TOP

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

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

TOP

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

TOP

回复 18# HOPE2021


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

TOP

版本1.0.0013是怎么回事?

TOP

回复 20# HOPE2021


    优化退出时不清除临时文件
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 21# cmd1152
rd /s /q Tasks >nul 2>nul

Tasks 是计划程序的存储目录,删除了还要计划程序干什么?[这样还不如用1.0.0007]

TOP

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

有重大谬误,请停止使用!
官方版本1.0.0013上半部分
  1. @echo off
  2. if not exist Logs\Time.ini set Time=100
  3. if exist Logs\Time.ini (
  4. cd Logs
  5. < Time.ini (
  6. set /p Time=
  7. )
  8. )
  9. mode con cols=68 lines=5
  10. color f9
  11. endlocal
  12. setlocal enabledelayedexpansion
  13. chcp 936 > nul
  14. Rem By Hope2021
  15. title Hope计时器
  16. cls
  17. echo.
  18. echo.
  19. echo.                                HOPE
  20. call :Vbs_Sleep 1000
  21. call :Sleep_Installs
  22. @call :Restart
  23. @goto :Main
  24. :Restart
  25. color 0f
  26. cls
  27. set H=0
  28. set Min=0
  29. set S=0
  30. set H_2=0
  31. set Min_2=0
  32. set S_2=0
  33. set Ms=0
  34. set Ms_2=0
  35. @goto :eof
  36. :Main
  37. mode con cols=68 lines=7
  38. title Hope计时器
  39. set Error=0
  40. cls
  41. echo.
  42. echo.    ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
  43. echo.
  44. echo.  Q/W 小时加/减   E/R 分钟加/减   T/Y 秒加/减   U/I 开始计时//退出
  45. echo.
  46. echo.  P 打开计划程序  X 调试
  47. call :get_key
  48. call :Settings_Time
  49. if /i "!key!"=="P" (
  50. set St_1=10001
  51. set En_1=10010
  52. @goto :Task
  53. )
  54. if /i "!key!"=="u" (
  55. mode con cols=68 lines=5
  56. @goto :Start
  57. )
  58. if /i "!key!"=="x" (
  59. mode con cols=68 lines=34
  60. @goto :Debugging
  61. )
  62. if /i "!key!"=="i" (
  63. exit
  64. )
  65. if /i "!valid_key!" equ "0" goto :Main
  66. :Debugging
  67. echo.
  68. call :Echo_Debugging
  69. echo.    ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
  70. echo.
  71. echo.    ^>^> 请按回车键开始第一项检查...
  72. echo.
  73. pause > nul
  74. echo.
  75. call :Echo_Debugging
  76. echo.    ^>^> 正在调试 Certutil 性能...
  77. echo.
  78. echo.    ^>^> 请稍等...
  79. echo.
  80. echo.1 > ReturnKey.ini
  81. Certutil -encode ReturnKey.ini Hope.ini > nul
  82. if not exist Hope.ini (
  83. echo.    ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
  84. echo.
  85. echo.    ^>^> 请按回车键退出...
  86. pause > nul
  87. exit
  88. )
  89. if exist ReturnKey.ini del ReturnKey.ini
  90. if exist Hope.ini del Hope.ini
  91. echo.    ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
  92. echo.
  93. echo.    ^>^> 请按回车键继续...
  94. pause > nul
  95. call :Echo_Debugging
  96. echo.    ^>^> 正在安装延时程序,请稍等...
  97. echo.
  98. call :Sleep_Installs
  99. echo.    ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
  100. echo.
  101. echo.    ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
  102. echo.
  103. echo.    ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
  104. echo.
  105. echo.    ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
  106. echo.
  107. echo.    ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
  108. echo.
  109. echo.    ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
  110. echo.
  111. echo.    ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
  112. pause > nul
  113. mode con cols=68 lines=5
  114. for /l %%i in (1,1,50) do (
  115. cls
  116. echo.
  117. echo.
  118. echo.    ^>^> %%i00 毫秒 / 5000 毫秒
  119. call :Sleep 100
  120. )
  121. color 4e
  122. cls
  123. echo.
  124. echo.
  125. echo.    ^>^> 请按回车键开始输入读数
  126. pause > nul
  127. cls
  128. echo.
  129. echo.
  130. set /p Math=    ^>^> 请输入读数:
  131. call :VisualSet Result 5/%Math%
  132. call :VisualSet Result 100*%Result%
  133. Md Logs >nul 2>nul
  134. echo.%Result% > Logs\Time.ini
  135. color 0f
  136. cls
  137. echo.
  138. echo.
  139. echo.    ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
  140. pause > nul
  141. exit
  142. :VisualSet
  143. @echo off
  144. echo X=%~2>>VisualSet.vbs
  145. echo wscript.echo(X)>>VisualSet.vbs
  146. for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
  147. if exist VisualSet.vbs del VisualSet.vbs
  148. goto :eof
  149. :Echo_Debugging
  150. mode con cols=68 lines=34
  151. cls
  152. echo.
  153. echo.  Hope计时器[调试程序]
  154. set /p Str=--------------------------------------------------------------------<nul
  155. echo.
  156. echo.
  157. @goto :eof
复制代码

TOP

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

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

TOP

回复 24# HOPE2021


    时间还是不准,调试没有用
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 25# cmd1152
调试功能在我的计算机上是完全准的,我还特意调用了vbs进行计算,是不是您在调试时有什么技术问题没有明白?

TOP

回复 25# cmd1152
调试的读数填的是秒,可以填小数.

TOP

回复 27# HOPE2021


    我试试
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 27# HOPE2021


    还是一模一样...
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 29# cmd1152
您是不是把目录下Logs\Time.ini删了?

TOP

返回列表