import os import time from win32com.client import Dispatch mp3file = "e:/mp4/am/xxx.mp3" #os.system(mp3file) mp = Dispatch("WMPlayer.OCX") media = mp.newMedia(mp3file) mp.currentPlaylist.appendItem(media) mp.controls.play() mp.controls.playItem(media) print(mp.controls.currentPosition) time.sleep(10) print(mp.controls.currentPosition) time.sleep(100)
暂无回答
我要回答