@echo off
if not exist vbPlay.vbs (
>vbPlay.vbs echo Set Args=WScript.Arguments
>>vbPlay.vbs echo For i=0 to Args.Count-1
>>vbPlay.vbs echo Dim Wmp:Set Wmp=CreateObject^("WMPlayer.OCX"^):Wmp.Settings.Volume="100":Wmp.Url=Args^(i^)
>>vbPlay.vbs echo While Wmp.PlayState=9 or Wmp.PlayState=6 or Wmp.PlayState=3:WScript.Sleep 1000:Wend:Set Wmp=Nothing
>>vbPlay.vbs echo Next
)
vbs核心函数:
Set Wmp=CreateObject^("WMPlayer.OCX"^)
?!
用高级的核心函数不是这样的
// Type Lib: C:\Windows\system32\wmp.dll (1)
// LIBID: {6BF52A50-394A-11D3-B153-00C04F79FAA6}
// LCID: 0
// Helpfile:
// HelpString: Windows Media Player
// DepndLst: