CODE: [Copy to clipboard]
::版权所有 趣味东::
@echo off&color 2e&mode con cols=60 lines=30
setlocal enableDelayedExpansion&title 歌词播放 QQ:309254515-趣味东制作 !time!
set/a"1/%1"2>nul||start /min mshta vbscript:createobject("wscript.shell").^
run("""%~nx0"" 1",0)(window.close)&&exit
set/a"1/(%1-1)"2>nul||(start /max /wait "" %0 2&cmd/c "del/a/f q.wd"
taskkill /f /im "mshta.exe" /im "cmd.exe" &exit)
for /l %%i in (1 1 50) do set ht=!ht!&set kg=!kg!
set cl=013456789abcdef
:hom
echo.请将有歌词(.lrc)的任意音乐托曳至此窗口^!
set/p mp=歌曲:
set bg=!mp:"=!
set mp="!bg!"
set lrc=!mp:~,-4!lrc"
echo.
if not exist !lrc! set/p lrc=歌词(*.lrc):
:收集时间段
for /f "delims=" %%i in ('type %lrc%') do (2>nul set str=%%i
if "!str:~,1!" equ "[" (call:t) else set/p=%%i<nul&echo.)
:排列时间段
:echo %tns%
:for /f %%i in ('for %%j in ^(%tns%^) do @echo %%j^|sort') do echo.%%i太慢 -不能排列
(for %%j in (%tns%) do @echo %%j)|sort /o q.wd
set tns=
:后台播放
start mshta vbscript:document.write("<bgsound src='!bg!' loop='1'>")
call:c 0
:延迟播放,排列后计算时间差做延迟
for /f "tokens=1-3 delims=. " %%i in ('type q.wd') do (
set/a c="(1%%i*60+1%%j)*100+1%%k-610100"
set/a t0="(1%time:~-8,2%*60+1%time:~-5,2%)*100+1%time:~-2%"
call:c !c!
echo. !%%i.%%j.%%k!)
call:c 1000
del /a /f /q q.wd >nul 2>nul
taskkill /f /im "mshta.exe" >nul 2>nul
echo.&goto hom
taskkill /im "cmd.exe" >nul 2>nul
exit
------------------------------------------------------
:t
if "!str:~,1!" equ "[" (
if "!str:~1,1!" gtr "9" (
for %%j in (ti.歌曲 ar.演唱 al.专辑 by.作者 ) do (
if /i "!str:~1,2!"=="%%~nj" set str=!str:]=!&echo. %%~xj - !str:~4!)
goto:eof)
if "!str:~1,1!" leq "9" set tn=!tn!!str:~1,8! &2>nul set str=!str:*]=!&goto t)
set tn=!tn::=.!
for %%j in (!tn!) do set "%%j=!str!"
set tns=!tns!!tn!
set tn=
goto:eof
------------------------------------------------------
:c
set/a t1="(1%time:~-8,2%*60+1%time:~-5,2%)*100+1%time:~-2%"
set/a tc=t1-t0
if !tc! lss 0 set/a tc+=360000
set/p=!ht!!time! !tc! %1<nul
if !tc! lss %1 goto c
set/p=!ht!!kg!!ht!<nul
goto:eof
------------------------------------------------------
[