Skip to content

Instantly share code, notes, and snippets.

@curzona
Created January 25, 2016 06:34
Show Gist options
  • Save curzona/95c2a11d45062427d5af to your computer and use it in GitHub Desktop.
Save curzona/95c2a11d45062427d5af to your computer and use it in GitHub Desktop.
import win32com.client
import win32gui
wmp = win32com.client.dynamic.Dispatch("WMPlayer.OCX")
wmp.settings.autoStart = True
wmp.settings.volume = 50
wmp.URL = "sample.wma"
while wmp.Playstate != 1:
win32gui.PumpWaitingMessages()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment