Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Run Windows Media Player and Close It

Keywords:     run windows media player close

Question:

On a Win2k machine am just trying to automatically run a Windows Media Player movie...after movie ends I want Windows Media Player to close. Here's the code I have. What happens is movie plays fine...but then stops and even with EXIT at the end of my code WM stays up. Any way other than WinGetActive and going down the route of trying to close by stating the window name?

Answer:

As far as I know MediaPlayer does not automatically close. Takes user input or something.

Maybe you can write a script to watch the media player, and when it is done, then close it. Does the title change to anything?

OR... Use PlayMedia to show the movie:

Movie = FileNameShort("C:\confidentiality.mwv")
playmedia('play %Movie% FULLSCREEN WAIT')
message(Movie,'Completed')

Article ID:   W15298