Jump to content

Basic Windows Media Player control


mark2004
 Share

Recommended Posts

Hi Everyone.

I'm trying to do some basic control of the playback of audio files with windows media player.  I'd like to be able to play/pause/jump back 5 seconds etc through scripting but I'm having some trouble.  Here is a basic test script I have been using to just open a file and let it play for 5 seconds and then pause it.  I can start playing the file just fine but I cannot pause it. Any ideas?

$oWM=ObjCreate("WMPlayer.OCX.7")
$oWM.OpenPlayer(@MyDocumentsDir & "\testMessage.wav")
Sleep(5000)
$oWM.Controls.pause

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...