Repositorio de scripts de irc.terrachat.cl desde los canales #TRAFFIC y #LATINWAREZ.
⬅️ Volver@echo off
set MYDIR=%CD%
::--------make sure winamp is running and if not, start it--------
tasklist /NH /FI "IMAGENAME EQ winamp.exe" | find /I /N "winamp.exe" > nul
if %ERRORLEVEL% == 0 goto winampok
echo Winamp is not running. Starting winamp first.
start winamp.exe
::------------------------------------------
:winampok
::-------------find winamp path-------------
if NOT DEFINED WINAMP echo Locating Winamp
if EXIST "C:\Program Files (x86)\Winamp\winamp.exe" set WINAMP=C:\Program Files (x86)\Winamp
if EXIST "C:\Program Files\Winamp\winamp.exe" set WINAMP=C:\Program Files\Winamp
if NOT DEFINED WINAMP (
echo WINAMP is NOT located in the normal place. Searching...
dir /s c:\winamp.exe | find "Directory of" > out.txt
for /F "tokens=3* delims= " %%a IN (out.txt) DO set WINAMP=%%a%%b
del out.txt
)
::-------some more checks -------------------
if not exist "%WINAMP%\WACommand.exe" goto nowac
if (%1) == () goto noarg
::------------remote commands to winamp-------------
set ADD=
if %1 == /ADD (
set ADD=ADD
shift
)
if %1 == /STOP (
"%WINAMP%\WACommand.exe" /stop
goto finis
)
if %1 == /PAUSE (
"%WINAMP%\WACommand.exe" /pause
goto finis
)
if %1 == /PLAY (
"%WINAMP%\WACommand.exe" /play
goto finis
)
if %1 == /PREV (
"%WINAMP%\WACommand.exe" /prev
goto finis
)
if %1 == /NEXT (
"%WINAMP%\WACommand.exe" /next
goto finis
)
if %1 == /RAND (
"%WINAMP%\WACommand.exe" /random=1
goto finis
)
if %1 == /NORAND (
"%WINAMP%\WACommand.exe" /random=0
goto finis
)
::-----make sure there is a mainlist---------
if %1 == /BUILD {
del mainlist.m3u > nul
shift
}
if not exist mainlist.m3u (
echo Building main list. This may take a minute or two...
echo #EXTM3U > mainlist.m3u
dir /S /B *.mp3 >> mainlist.m3u
)
if (%1) == () goto end
::-----------do the search---------------
copy mainlist.m3u temp.m3u > nul
for %%a in (%1 %2 %3 %4 %5 %6 %7 %8 %9) do (
findstr /IR "\<%%a\>" temp.m3u > temp2.m3u
del temp.m3u > nul
ren temp2.m3u temp.m3u
)
::---------------------------------------
::---count lines and check for no results---
find /C ".mp3" temp.m3u > count.txt
set COUNT=
for /f "delims=" %%a in (count.txt) do set COUNT=%%a
set COUNT=%COUNT:~20%
del count.txt > nul
if %COUNT% LSS 1 goto notfound
goto play
:notfound
echo No results found. Try again.
goto cleanup
::---------------------------------------
:play
if not %ADD%.==. goto queue
"%WINAMP%\WACommand.exe" /clear
"%WINAMP%\WACommand.exe" /load "%MYDIR%\temp.m3u"
"%WINAMP%\WACommand.exe" /play
goto cleanup
:queue
"%WINAMP%\WACommand.exe" /load "%MYDIR%\temp.m3u"
:cleanup
if exist temp.m3u del temp.m3u > nul
if exist count.txt del count.txt > nul
if exist out.txt del out.txt > nul
set MYDIR=
set ADD=
set COUNT=
set WINAMP=
:end
goto finis
:noarg
echo Error: no argument
echo Usage findit [/ADD] keyword <keywords...>
goto finis
:nowac
echo You must install WACommand.exe
goto finis
:finis
👁️ 5 vistas • 📥 0 descargas