想要自動隨機播放資料夾內的音樂一小時,
然後休息十五分鐘,
然後時間到了再繼續播放,
目前只會播放自動每三分換歌
@echo off
for /r %%i in (*.mp3) do (
start "" "%%i"
>nul ping 127.1 /n 180
)
pause
請各位幫忙
LIONDOGs wrote:
想要自動隨機播放資...(恕刪)
START command (原生是啟動windows media player 但無法讓windows media player STOP)。
要不要試試 其他的 PLAYER.
<網路文>
---------------
來個「start」結論:
不是為命令列設計的(如記事本),有沒有使用「start」都會繼續執行,但加了「/wait」之後等到程序結束。
為命令列設計的(如 ping ),完全不用「start」或加了「/wait」結果都一樣,但只用「start」會繼續執行
<有人是在batch中加入VB的code>
---------------------------
Playing Sounds (Visual Basic) :
https://msdn.microsoft.com/en-us/library/bc61hbxh(v=vs.100).aspx
In This Section
How to: Play Sounds in Visual Basic
Demonstrates how to play a sound from a sound file or application resource in the background.
How to: Play Looping Sounds in Visual Basic
Demonstrates how to play a sound from a sound file or application resource as a continuous loop.
How to: Stop Playing Sounds in the Background in Visual Basic
Demonstrates how to stop a sound playing in the background.
How to: Play System Sounds in Visual Basic
Demonstrates how to play a system sound.