![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Automating Windows Media Player. Hi, When $ie = New-Object -ComObject InternetExplorer.Application Command creates a new InternetExplorer application, (Visible thru task manager) Why is $wmp = new-object -ComObject MediaPlayer.MediaPlayer.1 not creating a new Windows Media Player application? Am I missing out something? Regards, Mugunth |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Automating Windows Media Player. MediaPlayer.MediaPlayer.1 is not self-hosting; it's from an OCX instead of an EXE, and to get a visible window it needs to be created within a GUI container. If you're after a visible, controllable media player, you may need to do some work to create a container in HTML to make it visible and possible to manipulate. Personally, I think this is an awful way to have to do it for scripting. If you just want to play audio files and don't care about visibility, you can use the following function that I developed based on suggestions from Jim Truher in the gadget-piano thread: #Start-Media.ps1 Param([string]$FilePath = $null) $player = New-Object -ComObject wmplayer.ocx; if($FilePath) { $media = $player.newmedia($FilePath) [void]$player.currentplaylist.appenditem($media); $player.controls.play(); } return $player; "Mugunth" <mugunth.kumar@gmail.com> wrote in message news:1160739236.728620.175620@i42g2000cwa.googlegroups.com... > Hi, > When > $ie = New-Object -ComObject InternetExplorer.Application > Command creates a new InternetExplorer application, (Visible thru task > manager) > Why is > $wmp = new-object -ComObject MediaPlayer.MediaPlayer.1 > not creating a new Windows Media Player application? > > Am I missing out something? > > Regards, > Mugunth > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows Media Player 11 in Vista the default player | Vista music pictures video | |||
| Windows media player stops working when I plug in my MP3 Player | Vista General | |||
| Windows Media player does not show wma files on my mp3 player | Vista music pictures video | |||
| Windows Media Player Playlist - load to player without using Sync? | Vista music pictures video | |||
| KMplayer, the media player that puts Windows Media Player to SHAME! | Vista General | |||