Code: Select all
set ac=^<^>
set MUSIC=for /L %%n in (1 1 2) do if %%n==2 (%\n%
for /F "tokens=1 delims=, " %%1 in ("!argv!") do (%\n%
set "argument1=%%1"%\n%
set prevmusic=!argument1!%\n%
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^^)%\n%
echo Sound.URL = "!argument1!.mp3"%\n%
echo Sound.settings.volume = 100%\n%
echo Sound.settings.setMode "loop", True%\n%
echo Sound.Controls.play%\n%
echo While Sound.playState !ac! 1%\n%
echo WScript.Sleep 100%\n%
echo Wend%\n%
^) ^>Music.vbs%\n%
start /min Music.vbs%\n%
) %\n%
) ELSE setlocal enableDelayedExpansion ^& set argv=,
Code: Select all
%MUSIC% JazzBeat3
%MUSIC% JazzBeat2
Code: Select all
!Line1!
So if Line1 is equal to "%MUSIC% JazzBeat3" on the txt file, it should play Jazzbeat3. However, it says that "%MUSIC% is not recognized". How can I solve this?
Thank, Grapefruits,