![]() |
#1 |
Junior Member
Join Date: Jan 2021
Posts: 3
|
Batch file help
My apologies if this has been covered. I couldn't find it via search.
I would like to create a simple batch file (not plugin) which PLAYS winamp if it gets stopped, paused, or otherwise not playing. I am not a coder. I managed to cobble together one that opens winamp and plays it, but not one that can restart it if it pauses/stops while open. I don't know enough about code for the IF/THEN commands. Any help would be appreciated. Windows 10. Winamp V 5.8 @ECHO off SET _PollingInterval=30 :BatchStart "C:\Program Files (x86)\Winamp\Winamp" /PLAY :Start :: PING 127.0.0.1 -n %_PollingInterval% >nul TIMEOUT /T %_PollingInterval% SET PID= FOR /F "tokens=2 delims= " %%i IN ('TASKLIST ^| FIND /i "subapp.exe"') DO SET PID=%%i IF [%PID%]==[] ( ECHO Application was not running. Restarting script. GOTO BatchStart ) GOTO Start GOTO:EOF |
![]() |
![]() |
![]() |
#2 |
Forum King
|
Try this instead and see if it works:
http://bogproghome.hopto.org/forums/...2b6f8fb1f4426a |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jan 2021
Posts: 3
|
Thank you! That seems to have done the trick. Much appreciated.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Jan 2021
Posts: 3
|
Batch file help
Actually it worked and then it didn't. Tested it a few times while open, pause, stop etc. Worked fine. Closed it completely and restarted, now not working. Am I missing something?
|
![]() |
![]() |
![]() |
#5 |
Forum King
|
Do you know what's causing Winamp to stop playing?
|
![]() |
![]() |
![]() |
|
Tags |
bat file pause/play |
Thread Tools | Search this Thread |
Display Modes | |
|
|