|
Answer» Thanks. I can play the song. But after the song is over the media player window is not closing. Please let me KNOW the format to close the media player window. I will be very happy. THANKS devduttaaI think what devduttaa means is that he wants windows media player to automatically close when it's finished playing the music. I'm fairly sure this was brought up before...Quote from: Helpmeh on March 30, 2009, 02:16:47 PM I'm fairly sure this was brought up before...
Twice Quote from: joedavis on March 30, 2009, 05:50:25 PMDevduttaa, Output: .
C:\>type playsong.bat Code: [Select]Rem @echo off REM COMMAND line argument for sleep REM playsong.bat 60 REM ARGUMENTS are: Sleep <SECONDS>
REM www.tricerat.com
C:\> cd C:\Program Files\Windows Media Player\
start wmplayer.exe Highway Blues
cd \
Sleep %1
For /F "tokens=2" %%n in ('tasklist ^| Find "wmplayer.exe"') Do Set Task=%%n
echo %Task%
taskkill /PID %Task%
C:\> Couldn't you just REPLACE sleep with ping? Some people don't have sleep.
|