使用批处理文件播放声音 [英] Play sounds with a batch file

查看:134
本文介绍了使用批处理文件播放声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用批处理文件播放声音或音乐文件,但我不希望 Windows 显示音乐播放器的窗口.所以我想在后台播放一个声音......我希望你能帮助我 :D

I want to play a sound or music file with Batch files, but I don't want that Windows show the window from the music player. So I want to play a sound in the background... I hope you can help me :D

推荐答案

这里有几个脚本.

mediarunner.bat - 它使用 windows 媒体播放器活动 x 对象,因此如果没有安装 Windows 媒体播放器,则无法使用(尽管它通常与 Windows 一起打包).仅接受一个参数 - 要播放的文件的路径.

mediarunner.bat - it uses windows media player active x objects so you cannot used if there's no installed Windows Media Player (though it usually comes packed with the Windows).Accepts only one argument - the path to the file you want to play.

spplayer.bat - 使用SP Voice 对象,但只能播放 .wav 文件.同样,它只接受您要播放的文件的路径作为参数.

spplayer.bat - uses SP Voice objects but can play only .wav files.Again it accepts as only argument the path to the file you want to play.

soundplayer.bat - 使用只能在 Internet Explorer 中使用的 Internet Explorer 对象和特定的 bgsound 标记.可以播放 .mp3、wav、.. 文件.它可以接受两个参数.要播放的文件和音量(-10000 到 0 之间的数字):

soundplayer.bat - uses Internet Explorer objects and specific bgsound tag that can be used only in internet explorer.Can play .mp3,wav,.. files. It can accepts two arguments. The file you want to play and the sound volume (a number between -10000 to 0) :

 call soundplayer.bat "C:WindowsMediaWindows Navigation Start.wav" 0

这篇关于使用批处理文件播放声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆