Alexbman Posted July 9, 2009 Posted July 9, 2009 I am trying to write a script that will run the full Windows Media Player application, stream a video from a URL, detect when the video has completed playing and then exit. This script is going to be run by 30-50 virtual machines at the same time for load testing. My past couple days of browsing this from and MSDN have not yielded the results I am looking for. My issue is that .playState () only works when the stream is opened with .URL = $url, and that method of opening the stream does not open the full WMplayer.exe like .openplayer($url) does. Can I make .URL behave like .openplayer($url) or make the .playState () command work with .openplayer($url)? Here is what my code looks like at the moment. $url = "http://itc.virginia.edu/network/videotest/when-I-go-to-UVA-lg.asx" ;Streaming Video URL $WMP = ObjCreate("WMPlayer.ocx") With $WMP ;.openPlayer($url) ;Unable to get $WMP.playState () .URL = $url ;does not open WMPlayer.exe EndWith sleep (2000) While $WMP.playState () = 3 MsgBox(0, "Play State:", $WMP.playState ()) WEnd $WMP.Close()
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now