VB脚本播放不了.wav格式的声音文件
Dim sound
Dim obshell
Set sound= "C:\Users\Administrator\Desktop\732W语音-女声\732W部品呼出-女声\732W FB-1 部品呼出.wav" '声音文件路径
Set objshell=CreateObject("WScript.Shell") '控件
objshell.Run "wmplayer.exe/play/close" & sound ,0 '调用播放器播放声音
问题补充:
Dim sound
Dim objwahshell
Set sound= "C:\Users\Administrator\Desktop\732W语音-女声\732W部品呼出-女声\732W FB-1 部品呼出.wav" ''声音文件路径
Set objwahshell=CreateObject("WScript.Shell") ''控件
objwahshell.Run "wmplayer.exe/play/close" & sound ,0 ''调用播放器播放声音
各位大侠,还是播放不了啊
图片说明:
最佳答案
vbs脚本示例:
Sub OnLButtonDown(ByVal Item, ByVal Flags, ByVal x, ByVal y)
Dim Player
Dim filestr
Set Player = CreateObject("wmplayer.ocx")
filestr="C:\1001.wav"
Player.url = filestr
MsgBox "播放......"
Set Player=nothing
End Sub
提问者对于答案的评价:
谢大侠
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc314641.html