复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!key!"=="u" (
- @goto :Start
- )
- )
- for %%i in (%H% %Min% %S%) do (
- if %%i Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 100
- )
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 100
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- if %ms%==10 set /a ms=0
- title 计时器[%Ms%/%Ms_2%毫秒]
- echo.
- echo. ^>^> %Ms%/%Ms_2%毫秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- title 计时器[%Ms%/%Ms_2%毫秒]
- if %Ms% lss %Ms_2% goto Start
- if %Ms% Geq %Ms_2% goto End
- :End
- cls
- color 4e
- title Hope计时器 [%Ms%/%Ms_2%毫秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!key!"=="u" (
- @goto :Start
- )
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- for %%i in (%H% %Min% %S%) do (
- if %%i Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 100
- )
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- set H=0
- set Min=0
- set S=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 100
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- if %ms%==10 set /a ms=0
- title 计时器[%Ms%/%Ms_2%毫秒]
- echo.
- echo. ^>^> %Ms%/%Ms_2%毫秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- title 计时器[%Ms%/%Ms_2%毫秒]
- if %Ms% lss %Ms_2% goto Start
- if %Ms% Geq %Ms_2% goto End
- :End
- cls
- color 4e
- title Hope计时器 [%Ms%/%Ms_2%毫秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!key!"=="u" (
- @goto :Start
- )
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- for %%i in (%H% %Min% %S%) do (
- if %%i Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Gtr 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Gtr 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Gtr 0 if %H% Gtr 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- if /i "!key!"=="u" (
- @goto :Start
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- call :Sleep_Installs
- set N1= ■■■ ■■■ ■■■ ■■■■■■■ ■■■■■■■
- set N2= ■ ■ ■ ■ ■ ■ ■ ■
- set N3= ■ ■ ■ ■ ■ ■ ■
- set N4= ■ ■ ■ ■ ■ ■ ■ ■
- set N5= ■■■■■■ ■ ■ ■■■■■■ ■■■■
- set N6= ■ ■ ■ ■ ■ ■ ■
- set N7= ■ ■ ■ ■ ■ ■
- set N8= ■ ■ ■ ■ ■ ■ ■
- set N9= ■■■ ■■■ ■■■ ■■■ ■■■■■■■
- Mode Con: Cols=80 Lines=30
- Rem Hope Text Art 片头
- call :Echo
- call :Sleep 20
- set "N1=%N1:■=回%"
- call :Echo
- call :Sleep 20
- set "N2=%N2:■=回%"
- call :Echo
- call :Sleep 20
- set "N3=%N3:■=回%"
- call :Echo
- call :Sleep 20
- set "N4=%N4:■=回%"
- call :Echo
- call :Sleep 20
- set "N5=%N5:■=回%"
- call :Echo
- call :Sleep 20
- set "N6=%N6:■=回%"
- call :Echo
- call :Sleep 20
- set "N7=%N7:■=回%"
- call :Echo
- call :Sleep 20
- set "N8=%N8:■=回%"
- call :Echo
- call :Sleep 20
- set "N9=%N9:■=回%"
- call :Echo
- call :Sleep 20
- set "N1=%N1:回=@%"
- call :Echo
- call :Sleep 20
- set "N2=%N2:回=@%"
- call :Echo
- call :Sleep 20
- set "N3=%N3:回=@%"
- call :Echo
- call :Sleep 20
- set "N4=%N4:回=@%"
- call :Echo
- call :Sleep 20
- set "N5=%N5:回=@%"
- call :Echo
- call :Sleep 20
- set "N6=%N6:回=@%"
- call :Echo
- call :Sleep 20
- set "N7=%N7:回=@%"
- call :Echo
- call :Sleep 20
- set "N8=%N8:回=@%"
- call :Echo
- call :Sleep 20
- set "N9=%N9:回=@%"
- call :Echo
- call :Sleep 20
- set "N1=%N1:@=∷%"
- call :Echo
- call :Sleep 20
- set "N2=%N2:@=∷%"
- call :Echo
- call :Sleep 20
- set "N3=%N3:@=∷%"
- call :Echo
- call :Sleep 20
- set "N4=%N4:@=∷%"
- call :Echo
- call :Sleep 20
- set "N5=%N5:@=∷%"
- call :Echo
- call :Sleep 20
- set "N6=%N6:@=∷%"
- call :Echo
- call :Sleep 20
- set "N7=%N7:@=∷%"
- call :Echo
- call :Sleep 20
- set "N8=%N8:@=∷%"
- call :Echo
- call :Sleep 20
- set "N9=%N9:@=∷%"
- call :Echo
- call :Sleep 20
- set "N1=%N1:∷=□%"
- call :Echo
- call :Sleep 20
- set "N2=%N2:∷=□%"
- call :Echo
- call :Sleep 20
- set "N3=%N3:∷=□%"
- call :Echo
- call :Sleep 20
- set "N4=%N4:∷=□%"
- call :Echo
- call :Sleep 20
- set "N5=%N5:∷=□%"
- call :Echo
- call :Sleep 20
- set "N6=%N6:∷=□%"
- call :Echo
- call :Sleep 20
- set "N7=%N7:∷=□%"
- call :Echo
- call :Sleep 20
- set "N8=%N8:∷=□%"
- call :Echo
- call :Sleep 20
- set "N9=%N9:∷=□%"
- call :Echo
- call :Sleep 20
- set "N1=%N1:□=_/%"
- call :Echo
- call :Sleep 20
- set "N2=%N2:□=_/%"
- call :Echo
- call :Sleep 20
- set "N3=%N3:□=_/%"
- call :Echo
- call :Sleep 20
- set "N4=%N4:□=_/%"
- call :Echo
- call :Sleep 20
- set "N5=%N5:□=_/%"
- call :Echo
- call :Sleep 20
- set "N6=%N6:□=_/%"
- call :Echo
- call :Sleep 20
- set "N7=%N7:□=_/%"
- call :Echo
- call :Sleep 20
- set "N8=%N8:□=_/%"
- call :Echo
- call :Sleep 20
- set "N9=%N9:□=_/%"
- call :Echo
- call :Sleep 20
- set "N1=%N1:_/= %"
- call :Echo
- call :Sleep 20
- set "N2=%N2:_/= %"
- call :Echo
- call :Sleep 20
- set "N3=%N3:_/= %"
- call :Echo
- call :Sleep 20
- set "N4=%N4:_/= %"
- call :Echo
- call :Sleep 20
- set "N5=%N5:_/= %"
- call :Echo
- call :Sleep 20
- set "N6=%N6:_/= %"
- call :Echo
- call :Sleep 20
- set "N7=%N7:_/= %"
- call :Echo
- call :Sleep 20
- set "N8=%N8:_/= %"
- call :Echo
- call :Sleep 20
- set "N9=%N9:_/= %"
- call :Echo_2
- call :Sleep 20
- pause>nul
- :Echo
- color 1f
- Mode Con: Cols=80 Lines=30
- cls
- for /l %%i in (1,1,8) do echo.
- echo.%N1%
- echo.%N2%
- echo.%N3%
- echo.%N4%
- echo.%N5%
- echo.%N6%
- echo.%N7%
- echo.%N8%
- echo.%N9%
- for /l %%i in (1,1,5) do echo.
- echo. HOPE
- goto :eof
- :Echo_2
- color 1f
- Mode Con: Cols=80 Lines=30
- cls
- for /l %%i in (1,1,8) do echo.
- echo.%N1%
- echo.%N2%
- echo.%N3%
- echo.%N4%
- echo.%N5%
- echo.%N6%
- echo.%N7%
- echo.%N8%
- echo.%N9%
- goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- echo.Wscript.Sleep %1 > Sleep.vbs
- cscript //nologo Sleep.vbs
- goto :eof
- )
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- if /i "!key!"=="u" (
- @goto :Start
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. HOPE
- color 0f
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- title Hope计时器
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^>当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- if /i "!key!"=="u" (
- @goto :Start
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- mode con cols=68 lines=5
- color f9
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- call :get_key
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- if /i "!key!"=="i" (
- exit
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
- if /i "!key!"=="u" (
- @goto :Start
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- echo. ^>^> 编号:%%~ni
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建了计划:%Num%
- echo.
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @goto :Restart
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :Main
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @goto :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @goto :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- mode con cols=68 lines=34
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="i" (
- del sleep.vbs sleep.com sleep.exe >nul 2>nul
- rd /s /q Tasks >nul 2>nul
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.vbs sleep.com sleep.exe >nul 2>nul
- rd /s /q Tasks >nul 2>nul
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep 100
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- mode con cols=68 lines=5
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
rd /s /q Tasks >nul 2>nul
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
复制代码
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
复制代码
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=4" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content= "
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "时间到" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
复制代码
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="i" (
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
复制代码
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="s" (
- rd /s /q tasks
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
复制代码
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时//退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="s" (
- rd /s /q tasks
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
复制代码
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 H 恢复到调试前
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="h" (
- rd /s /q logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键退出本程序, 退出后, 请您重启本程序...
- pause > nul
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
复制代码
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
U/I 开始计时//退出
复制代码
- @echo off
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 H 恢复到调试前
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="h" (
- rd /s /q logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- start %~0
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
复制代码
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :tp
- 版权声明:
- 本程序是由HOPE2021和cmd1152共同制作
- 未经同意,禁止转载!
- :tp
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=7
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 H 恢复到调试前
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="h" (
- rd /s /q logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- start %0
- exit
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
复制代码
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :tp
- 版权声明:
- 本程序是由HOPE2021和cmd1152共同制作
- 未经同意,禁止转载!
- :tp
- if not exist Logs\Time.ini set Time=100
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------
- echo. /HOPE/
- echo. ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE-
- echo. --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. --HOPE--
- echo. ---------
- ping/n 1 127.1>nul
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. - --------
- echo. --HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --- ------
- echo. -- HOPE---
- echo. - --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----- ----
- echo. ---H PE---
- echo. --- ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------- --
- echo. ---HOP ---
- echo. ----- ----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. ---HOPE- -
- echo. ------- --
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ---------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- )
- ping/n 1 127.1>nul
- cls
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Restart
- color 0f
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- color 0f
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 H 恢复到调试前
- echo.
- echo. G 更改颜色
- call :get_key
- call :Settings_Time
- if /i "!key!"=="P" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="g" (
- cls
- mode con cols=64 lines=13
- echo.颜色属性由两个十六进制数字指定 -- 第一个为背景,第二个则为
- echo.前景。每个数字可以为以下任何值之一:
- echo.
- echo. 0 = 黑色 8 = 灰色
- echo. 1 = 蓝色 9 = 淡蓝色
- echo. 2 = 绿色 A = 淡绿色
- echo. 3 = 浅绿色 B = 淡浅绿色
- echo. 4 = 红色 C = 淡红色
- echo. 5 = 紫色 D = 淡紫色
- echo. 6 = 黄色 E = 淡黄色
- echo. 7 = 白色 F = 亮白色
- set /p color=输入颜色码,例如0a^>
- color %color%
- goto :Main
- )
- if /i "!key!"=="h" (
- rd /s /q logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color 0f
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- start %~0
- exit
复制代码
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color 0f
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- color 0f
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
/S 除目录本身外,还将删除指定目录下的所有子目录和
文件。用于删除目录树。
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo. HOPE
- echo.
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- call :23_Blank
- for %%i in (
- M a k e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- Y o u r
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- L i f e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- E a s i e r .
- ) do (
- call :Type "%%i"
- )
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
复制代码
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo. HOPE
- echo.
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- call :23_Blank
- for %%i in (
- M a k e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- Y o u r
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- L i f e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- E a s i e r .
- ) do (
- call :Type "%%i"
- )
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
复制代码
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo. HOPE
- echo.
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- call :23_Blank
- for %%i in (
- M a k e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- Y o u r
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- L i f e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- E a s i e r .
- ) do (
- call :Type "%%i"
- )
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
复制代码
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo. HOPE
- echo.
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------
- echo. /HOPE/
- echo. ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE-
- echo. --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. --HOPE--
- echo. ---------
- ping/n 1 127.1>nul
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. - --------
- echo. --HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --- ------
- echo. -- HOPE---
- echo. - --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----- ----
- echo. ---H PE---
- echo. --- ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------- --
- echo. ---HOP ---
- echo. ----- ----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. ---HOPE- -
- echo. ------- --
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ---------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. ---------
- echo. --HOPE---
- echo. ----Li----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE---
- echo. --- Lif---
- ping/n 1 127.1>nul
- cls
- echo.
- echo. -------
- echo. HOPE---
- echo. --r Life--
- ping/n 1 127.1>nul
- cls
- echo.
- echo. H------
- echo. OPE---
- echo. -ur Life -
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HO-----
- echo. PE---
- echo. our Life E
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOP----
- echo. E---
- echo. Your Life Ea
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE---
- echo. ---
- echo. Your Life Eas
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE --
- echo. --
- echo. e Your Life Easi
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE -
- echo. -
- echo. ke Your Life Easie
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo.
- echo. ake Your Life Easier
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo.
- echo. Make Your Life Easier.
- ping/n 1 127.1>nul
- ping/n 1 127.1>nul
- cls
- call :23_Blank
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
复制代码
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- echo.
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- for /l %%i in (1,1,3) do (
- cls
- echo.
- echo.
- echo. -HOPE-
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. \HOPE\
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. ^|HOPE^|
- ping/n 1 127.1>nul
- cls
- echo.
- echo.
- echo. /HOPE/
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. / /
- echo. /HOPE/
- echo. / /
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /- -/
- echo. /HOPE/
- echo. /- -/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. /----/
- echo. /HOPE/
- echo. /----/
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------
- echo. /HOPE/
- echo. ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE-
- echo. --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. --HOPE--
- echo. ---------
- ping/n 1 127.1>nul
- for /l %%i in (1,1,2) do (
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. - --------
- echo. --HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --- ------
- echo. -- HOPE---
- echo. - --------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----- ----
- echo. ---H PE---
- echo. --- ------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ------- --
- echo. ---HOP ---
- echo. ----- ----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. ---HOPE- -
- echo. ------- --
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ---------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- )
- cls
- echo.
- echo. ---------
- echo. --HOPE---
- echo. ----Li----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE---
- echo. --- Lif---
- ping/n 1 127.1>nul
- cls
- echo.
- echo. -------
- echo. HOPE---
- echo. --r Life--
- ping/n 1 127.1>nul
- cls
- echo.
- echo. H------
- echo. OPE---
- echo. -ur Life -
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HO-----
- echo. PE---
- echo. our Life E
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOP----
- echo. E---
- echo. Your Life Ea
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE---
- echo. ---
- echo. Your Life Eas
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE --
- echo. --
- echo. e Your Life Easi
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE -
- echo. -
- echo. ke Your Life Easie
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo.
- echo. ake Your Life Easier
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo.
- echo. Make Your Life Easier.
- ping/n 3 127.1>nul
- call :23_Blank
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
复制代码
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0028]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo. HOPE
- echo.
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- )
- call :23_Blank
- for %%i in (
- M a k e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- Y o u r
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- L i f e
- ) do (
- call :Type "%%i"
- )
- call :Blank
- for %%i in (
- E a s i e r .
- ) do (
- call :Type "%%i"
- )
- echo.
- for /l %%i in (1,1,68) do call :Zero_Type "-"
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Zero_Type
- set /p Str=%~1<nul
- @goto :eof
- :Blank
- call :Type "# "
- @goto :eof
- :23_Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序][%St_1%-%En_1%]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- echo.
- echo. ^>^> A 上一页 X 下一页
- if exist Tasks\*.Htd (
- for /l %%i in (%St_1%,1,%En_1%) do if exist Tasks\%%i.Htd goto :Task_2
- )
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- @goto :Task_3
- :Task_2
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /l %%i in (%St_1%,1,%En_1%) do (
- if exist %%i.Htd (
- for /f "skip=5" %%j in (%%i.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- )
- cd..
- :Task_3
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="A" (
- set /a St_1-=10
- set /a En_1-=10
- )
- if /i "!key!"=="X" (
- set /a St_1+=10
- set /a En_1+=10
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if %St_1% Leq 10000 (
- set /a St_1+=10
- set /a En_1+=10
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
复制代码
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- echo.
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- ping/n 1 127.1>nul
- cls
- echo.
- echo. ---------
- echo. --HOPE---
- echo. ----Li----
- ping/n 1 127.1>nul
- cls
- echo.
- echo. --------
- echo. -HOPE---
- echo. --- Lif---
- ping/n 1 127.1>nul
- cls
- echo.
- echo. -------
- echo. HOPE---
- echo. --r Life--
- ping/n 1 127.1>nul
- cls
- echo.
- echo. H------
- echo. -OPE---
- echo. -ur Life -
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HO-----
- echo. -PE---
- echo. our Life E
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOP----
- echo. -E---
- echo. Your Life Ea
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE---
- echo. ----
- echo. Your Life Eas
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE --
- echo. ---
- echo. e Your Life Easi
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE -
- echo. --
- echo. ke Your Life Easie
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo. -
- echo. ake Your Life Easier
- ping/n 1 127.1>nul
- cls
- echo.
- echo. HOPE
- echo.
- echo. Make Your Life Easier.
- ping/n 3 127.1>nul
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
复制代码
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
复制代码
- @echo off&goto :Begin
- ; Hope Timer [Version 1.0.0024]
- ; (C) Copyright 2020-2021 Hope Corp.
- ; (C) Copyright 2021-2021 Hope2021&Cmd1152 Corp.
- :Begin
- md Logs >nul 2>nul
- mode con cols=68 lines=5
- color f9
- endlocal
- setlocal enabledelayedexpansion
- chcp 936 > nul
- Rem By Hope2021
- title Hope计时器
- cls
- echo.
- echo.
- echo. HOPE
- echo.
- call :Sleep_Installs
- if not exist Logs\Time.ini set Time=100
- if not exist Logs\Timer.ini set Timer=128
- if not exist Logs\Color.ini set Color=0f
- if exist Logs\Time.ini (
- cd Logs
- < Time.ini (
- set /p Time=
- )
- cd..
- )
- if exist Logs\Timer.ini (
- cd Logs
- < Timer.ini (
- set /p Timer=
- )
- cd..
- )
- if exist Logs\Color.ini (
- cd Logs
- < Color.ini (
- set /p Color=
- )
- cd..
- )
- cls
- echo.
- echo. ----------
- echo. ---HOPE---
- echo. ----------
- call :djs
- cls
- echo.
- echo. ---------
- echo. --HOPE---
- echo. ----Li----
- call :djs
- cls
- echo.
- echo. --------
- echo. -HOPE---
- echo. --- Lif---
- call :djs
- cls
- echo.
- echo. -------
- echo. HOPE---
- echo. --r Life--
- call :djs
- cls
- echo.
- echo. H------
- echo. -OPE---
- echo. -ur Life -
- call :djs
- cls
- echo.
- echo. HO-----
- echo. -PE---
- echo. our Life E
- call :djs
- cls
- echo.
- echo. HOP----
- echo. -E---
- echo. Your Life Ea
- call :djs
- cls
- echo.
- echo. HOPE---
- echo. ----
- echo. Your Life Eas
- call :djs
- cls
- echo.
- echo. HOPE --
- echo. ---
- echo. e Your Life Easi
- call :djs
- cls
- echo.
- echo. HOPE -
- echo. --
- echo. ke Your Life Easie
- call :djs
- cls
- echo.
- echo. HOPE
- echo. -
- echo. ake Your Life Easier
- call :djs
- cls
- echo.
- echo. HOPE
- echo.
- echo. Make Your Life Easier.
- call :djs
- call :Vbs_Sleep 1000
- call :Sleep_Installs
- @call :Restart
- @goto :Main
- :Blank
- call :Type "# "
- @goto :eof
- :Type
- set /p Str=%~1<nul
- for /l %%a in (1,1,%Timer%) do set ReturnKey=0
- @goto :eof
- :Djs
- for /l %%a in (1,1,700) do set ReturnKey=0
- @goto :eof
- :Restart
- color %Color%
- cls
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- @goto :eof
- :Main
- mode con cols=68 lines=9
- title Hope计时器
- set Error=0
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U/I 开始计时/退出
- echo.
- echo. P 打开计划程序 S 删除计划存储 X 调试 F 恢复到调试前
- echo.
- echo. Z 风格 D 初始化
- call :get_key
- call :Settings_Time
- if /i "!key!"=="p" (
- set St_1=10001
- set En_1=10010
- @goto :Task
- )
- if /i "!key!"=="u" (
- mode con cols=68 lines=5
- set "Title=时间到!!!"
- @goto :Start
- )
- if /i "!key!"=="z" (
- mode con cols=68 lines=34
- @goto :Themes
- )
- if /i "!key!"=="x" (
- mode con cols=68 lines=34
- @goto :Debugging
- )
- if /i "!key!"=="f" (
- rd /s /q Logs >nul 2>nul
- )
- if /i "!key!"=="s" (
- rd /s /q Tasks >nul 2>nul
- )
- if /i "!key!"=="d" (
- del sleep.com sleep.exe sleep.vbs
- rd /s /q Tasks >nul 2>nul
- rd /s /q Logs >nul 2>nul
- mode con cols=68 lines=5
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause>nul
- start %~0
- exit
- )
- if /i "!key!"=="i" (
- del sleep.com sleep.exe sleep.vbs
- exit
- )
- if /i "!valid_key!" equ "0" goto :Main
- :Themes
- cd logs
- echo.%Color% > Color.ini
- echo.%Timer% > Timer.ini
- cd..
- cls
- color %Color%
- echo.
- echo. Hope计时器[风格]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^>^>^> 颜色
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. A 经典 B 标准 C 激情 D 复古 ^| Hope.
- echo. ^|
- echo. E 大理岩 F 未来 G 蓝色 H 紫色 ^| Make Your Life Easier.
- echo. ^|
- echo. ^>^>^>^> 开始动画速度
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|why join the navy,
- echo. J 正常 K 快速 L 慢速 ^|if you can be a pirate?
- echo. ^| - Steve Jobs
- echo. ^|
- echo. ^>^>^>^> 操作
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo. ^|
- echo. M 返回 N 还原默认 ^|
- call :get_key
- if /i "!key!"=="a" (
- set Color=3f
- )
- if /i "!key!"=="b" (
- set Color=0f
- )
- if /i "!key!"=="c" (
- set Color=4e
- )
- if /i "!key!"=="d" (
- set Color=8f
- )
- if /i "!key!"=="e" (
- set Color=f8
- )
- if /i "!key!"=="f" (
- set Color=0a
- )
- if /i "!key!"=="g" (
- set Color=b1
- )
- if /i "!key!"=="h" (
- set Color=5f
- )
- if /i "!key!"=="j" (
- set Timer=128
- )
- if /i "!key!"=="k" (
- set Timer=32
- )
- if /i "!key!"=="l" (
- set Timer=512
- )
- if /i "!key!"=="m" (
- goto Main
- )
- if /i "!key!"=="n" (
- cd Logs
- del Timer.ini
- del Color.ini
- cd..
- set Timer=128
- set Color=0f
- )
- if /i "!valid_key!" equ "0" goto :Themes
- :Rem_Themes
- ; A 3F
- ; B 0F
- ; C 4E
- ; D 8F
- ; E F8
- ; F 0A
- ; G B1
- ; H 5F
- @goto :eof
复制代码
- :Debugging
- echo.
- call :Echo_Debugging
- echo. ^>^> 此向导将会帮助您调试您的设备是否适合运行 Hope (R) 计时器
- echo.
- echo. ^>^> 请按回车键开始第一项检查...
- echo.
- pause > nul
- echo.
- call :Echo_Debugging
- echo. ^>^> 正在调试 Certutil 性能...
- echo.
- echo. ^>^> 请稍等...
- echo.
- echo.1 > ReturnKey.ini
- Certutil -encode ReturnKey.ini Hope.ini > nul
- if not exist Hope.ini (
- echo. ^>^> 您的操作系统与 Certutil 不兼容, 无法运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键退出...
- pause > nul
- exit
- )
- if exist ReturnKey.ini del ReturnKey.ini
- if exist Hope.ini del Hope.ini
- echo. ^>^> 您的操作系统与 Certutil 兼容, 可以运行Hope计时器...
- echo.
- echo. ^>^> 请按回车键继续...
- pause > nul
- call :Echo_Debugging
- echo. ^>^> 正在安装延时程序,请稍等...
- echo.
- call :Sleep_Installs
- echo. ^>^> 接下来,您将会调试秒表, 我们将会为您进行系统标准计时...
- echo.
- echo. ^>^> 我们会为你进行延时五秒,请您准备好您的计时设备...
- echo.
- echo. ^>^> 请将您的计时设备置于您的电子计算机左侧, 打开计时设备但
- echo.
- echo. ^>^> 不要开始计时, 请注意, 您按下回车键或空格键之后Hope计时
- echo.
- echo. ^>^> 器将开始计时, 您应当同时启动Hope计时器与您的设备...
- echo.
- echo. ^>^> 当Hope计时器的窗体变红时, 您应当停止您的计时设备, 按下
- echo.
- echo. ^>^> 回车键, 并填写读数, Hope计时器会为您自动校准...
- pause > nul
- mode con cols=68 lines=5
- for /l %%i in (1,1,50) do (
- cls
- echo.
- echo.
- echo. ^>^> %%i00 毫秒 / 5000 毫秒
- call :Sleep 100
- )
- color 4e
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键开始输入读数
- pause > nul
- cls
- echo.
- echo.
- set /p Math= ^>^> 请输入读数:
- call :VisualSet Result 5/%Math%
- call :VisualSet Result 100*%Result%
- Md Logs >nul 2>nul
- echo.%Result% > Logs\Time.ini
- color %Color%
- cls
- echo.
- echo.
- echo. ^>^> 请按回车键重启本程序...
- pause > nul
- @goto :Begin
- :VisualSet
- @echo off
- echo X=%~2>>VisualSet.vbs
- echo wscript.echo(X)>>VisualSet.vbs
- for /f %%a in ('cscript //nologo VisualSet.vbs') do set %1=%%a
- if exist VisualSet.vbs del VisualSet.vbs
- goto :eof
- :Echo_Debugging
- mode con cols=68 lines=34
- cls
- echo.
- echo. Hope计时器[调试程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- @goto :eof
- :Task
- mode con cols=68 lines=34
- Md Tasks >nul 2>nul
- cls
- title Hope计时器[计划程序]
- set Error=0
- echo.
- echo. Hope计时器[计划程序]
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- echo. ^>^> Q 新建计划 W 使用计划 D 删除计划 E 返回菜单 R 退出
- if not exist Tasks\*.Htd (
- echo.
- echo. ^>^> 当前没有计划
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- )
- if not exist Tasks\Htd.Hdat echo.10000 > Tasks\Htd.Hdat
- if exist Tasks\*.Htd (
- cd Tasks
- echo.
- echo. ^>^> 当前计划列表
- set /p Str=--------------------------------------------------------------------<nul
- echo.
- echo.
- for /f %%i in ('dir /b *.Htd') do (
- for /f "skip=5" %%j in (%%~ni.Htd) do echo. ^>^> 编号:%%~ni 备注:%%j
- )
- echo.
- cd..
- )
- )
- call :get_key
- if /i "!key!"=="E" (
- @goto :Main
- )
- if /i "!key!"=="D" (
- @goto :Del
- )
- if /i "!key!"=="R" (
- exit
- )
- if /i "!key!"=="Q" (
- @goto :New
- )
- if /i "!key!"=="W" (
- @goto :Open
- )
- if /i "!valid_key!" equ "0" @goto :Task
- :Open
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Open_2
- ) else cd..&@goto :Task
- :Del
- if exist Tasks\*.Htd (
- set "Content= "
- set /p Content= ^>^> 请输入计划编号:
- goto Del_2
- ) else cd..&@goto :Task
- :Del_2
- cd Tasks
- if exist %Content%.Htd (
- del %Content%.Htd
- cd..
- goto Task
- ) else cd..&goto Task
- :Open_2
- cd Tasks
- if exist %Content%.Htd (
- call :Read %Content%
- cd..
- mode con cols=68 lines=5
- @goto :Start
- ) else cd..&goto Task
- :New
- cd Tasks
- < Htd.Hdat (
- set /p Num=
- )
- set /a Num+=1
- echo.%Num% > Htd.Hdat
- cd..
- echo.
- echo. ^>^> 新建计划:%Num%
- echo.
- set "Content=时间到!!!"
- set /p Content= ^>^> 备注:
- echo.
- set "Content=%Content:>=^>%"
- set "Content=%Content:<=^<%"
- set "Content=%Content:|=^|%"
- set "Title= "
- set /p Title= ^>^> 到时提醒:
- echo.
- set "Title=%Title:>=^^^>%"
- set "Title=%Title:<=^^^<%"
- set "Title=%Title:|=^^^|%"
- set H=0
- set Min=0
- set S=0
- set H_2=0
- set Min_2=0
- set S_2=0
- set Ms=0
- set Ms_2=0
- call :Vbs_Sleep 1000
- @goto :New_2
- :Read
- < %1.Htd (
- set /p H=
- set /p Min=
- set /p S=
- set /p Ms_2=
- set /p Title=
- set /p Content=
- )
- @goto :eof
- :New_2
- cls
- echo.
- echo. ^>^> 当前计时时间:%H%小时%Min%分钟%S%秒
- echo.
- echo. Q/W 小时加/减 E/R 分钟加/减 T/Y 秒加/减 U 完成计划
- echo.
- call :get_key
- call :Settings_Time
- if /i "!key!"=="U" (
- (
- echo.%H%
- echo.%Min%
- echo.%S%
- echo.%Ms_2%
- echo.%Title%
- echo.%Content%
- ) > Tasks\%Num%.Htd
- @goto :Task
- )
- if /i "!valid_key!" equ "0" @goto :New_2
- :Error
- color 1f
- cls
- echo.
- echo. ^>^> Sleep.exe 和 Sleep.com 不知到何处去了...
- echo.
- echo. ^>^> 正在帮您恢复
- call :Sleep_Installs
- goto :Restart
- :Start
- set Error=0
- cls
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- echo.
- echo. ^>^> %H_2%小时%Min_2%分钟%S_2%秒%Ms%毫秒/%H%小时%Min%分钟%S%秒
- echo.
- echo. ^>^> Ctrl+C暂停或退出...
- call :Sleep %Time%
- if %Error%==1 goto :Error
- set /a Ms+=100
- if %Ms%==1000 set /a S_2+=1&set Ms=0
- if %S_2% Geq 60 set /a Min_2+=1&set S_2=0
- if %Min_2% Geq 60 set /a H_2+=1&set Min_2=0
- if %H_2% Geq %H% if %Min_2% Geq %Min% if %S_2% Geq %S% goto :End
- if /i "!valid_key!" equ "0" goto :Start
- :End
- cls
- color 4e
- title 计时器[%H_2%小时%Min_2%分钟%S_2%秒/%H%小时%Min%分钟%S%秒]
- Call :Msg "%Title%" vbExclamation "Hope计时器"
- color %Color%
- @call :Restart
- @goto :Main
- :Vbs_Sleep
- echo.Wscript.Sleep %1 > Sleep.vbs
- call Sleep.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- @goto :eof
- :Sleep_Installs
- (
- echo.-----BEGIN CERTIFICATE-----
- echo.TVpQAQEAAAAEAAAA//8AAFABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAkAAAAPy+gQAPtkz/ZjHSZjHASXggrCwwchQ8CXcQZmvSCmYB
- echo.wi7HBi8AMQDr5C7/Ji8ADgBmadLoAwAAZonRZsHpELSGzRW4AEzNIQAAAAAAAAAA
- echo.UEUAAEwBAQBQeaU2AAAAAAAAAADgAA8BCwEFDAACAAAAAAAAAAAAAH4QAAAAEAAA
- echo.ACAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAAAAAIAAAAAAAADAAAA
- echo.AAAQAAAQAAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAQEAAAKAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAudGV4dAAAANwAAAAAEAAAAAIAAAACAAAAAAAAAAAAAAAAAAAgAADg
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWEAAAZBAAAHYQAAAAAAAA
- echo.RhAAAAAAAAAAAAAAOBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEtFUk5FTDMy
- echo.LmRsbAAAVhAAAGQQAAB2EAAAAAAAAAAARXhpdFByb2Nlc3MAAABHZXRDb21tYW5k
- echo.TGluZUEAAABTbGVlcAD/FQQQQAAx0khAgDgAdBGAOCJ1AvfSCdJ174A4IHXqQPyJ
- echo.xjHSMcCsCMB0IywwchU8CXcRa9IKAcLHBckQQADNEEAA6+L/JckQQAClEEAAUv8V
- echo.CBBAAGoA/xUAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- echo.AAAAAAAAAAAAAAAAAAAAAA==
- echo.-----END CERTIFICATE-----
- ) > Sleep.com
- Certutil -Decode Sleep.com Sleep.exe > nul
- Certutil -Decode -f Sleep.com Sleep.com > nul
- goto :eof
- :Sleep
- set Error=0
- if exist Sleep.exe (
- Sleep.exe %1
- goto :eof
- )
- if not exist Sleep.exe if exist Sleep.com (
- Sleep.com %1
- goto :eof
- )
- if not exist Sleep.exe if not exist Sleep.com (
- set Error=1
- goto :eof
- )
- :get_key
- rem 用法:call :get_key
- set "key="
- for /f "delims=" %%a in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%a"
- set "key=%key:~-1%"
- set "valid_key=0"
- goto :eof
- :Msg
- Rem 用法: Call :Msg "Text" [buttons] "Title"
- echo.Msg=msgbox("%~1",%2,"%~3") > ReturnKey.vbs
- Call ReturnKey.vbs > nul
- if exist ReturnKey.vbs del ReturnKey.vbs
- goto :eof
- :Settings_Time
- if %Ms_2% Leq 200000000 if %H% geq 0 if %Min% Geq 0 if %S% Geq 0 (
- if /i "!key!"=="q" (
- set /a Ms_2+=3600000
- set /a H+=1
- )
- if /i "!key!"=="w" (
- set /a Ms_2-=3600000
- set /a H-=1
- )
- if /i "!key!"=="e" (
- set /a Ms_2+=60000
- set /a Min+=1
- )
- if /i "!key!"=="r" (
- set /a Ms_2-=60000
- set /a Min-=1
- )
- if /i "!key!"=="t" (
- set /a Ms_2+=1000
- set /a S+=1
- )
- if /i "!key!"=="y" (
- set /a Ms_2-=1000
- set /a S-=1
- )
- )
- if %S% Lss 0 (
- if %Min% Geq 0 if %H% Geq 0 (
- set /a Min-=1&set /a S+=60
- )
- if %Min% Leq 0 if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %Min% Lss 0 (
- if %H% Gtr 0 set /a H-=1&set /a Min+=60
- if %H% Leq 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- )
- if %H% Lss 0 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %Ms_2% Gtr 200000000 (
- echo.
- echo. ^>^> 算数错误!
- call :Vbs_Sleep 100
- @call :Restart
- )
- if %S% Geq 60 set /a Min+=1&set S=0
- if %Min% Geq 60 set /a H+=1&set Min=0
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |