用批处理文件播放隐形音乐? [英] Play invisible music with batch file?
本文介绍了用批处理文件播放隐形音乐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到一些线程说如何在以 start/min
开头时最小化播放的情况下播放音乐,以及创建一个 VBS 脚本来运行最小化的音频.但是无论我尝试以哪种方式最小化运行音频,它都会出现在屏幕上.
I've seen a cfew threads that say how to play music with the play minimized when it starts with start /min
, as well as one that creates a VBS script to run the audio minimized. But no matter which way I try to get audio to run minimized, it appears on screen.
另外,如果我尝试 start/min
或 start/max
我会得到相同的结果.
Also, if I try start /min
or start /max
I'll get the same result.
有谁知道我怎样才能开始最小化一些东西?
Does anyone know how I can get something to start minimized?
推荐答案
@echo off
set "file=track12.mp3"
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
echo Sound.URL = "%file%"
echo Sound.Controls.play
echo do while Sound.currentmedia.duration = 0
echo wscript.sleep 100
echo loop
echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
start /min sound.vbs
只需将 track12.mp3
更改为您的音频文件的名称
just change track12.mp3
with the name of your audio file
要循环播放同一首歌曲:
To loop the same song:
@echo off
set "file=track12.mp3"
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
echo Sound.URL = "%file%"
echo Sound.Controls.play
echo do while Sound.currentmedia.duration = 0
echo wscript.sleep 100
echo loop
echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
:loop
start "" /wait /min sound.vbs
goto:loop
这篇关于用批处理文件播放隐形音乐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文