播放歌曲的批处理文件 [英] Batch File To Play A Song

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

问题描述

我有一点情况,我需要让一个批处理文件在我制作的程序上播放一首歌,但这里有一个问题,我需要播放器不可见,你一定不能看到它,在那里有什么办法可以让歌曲在结束时播放?

I have a bit of a situation, I need to make a batch file play a song on a program I have made, but here is the catch, I need the player to be invisible, you must not see it, is there any way of doing this so the song will play once the end?

谢谢:D

推荐答案

这是一个播放音频文件的 Bat/VBS :

Here is a Bat/VBS to play an audio file :

@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

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

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