Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.062 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'tune': 0.09; 'guys,': 0.16; 'guys?': 0.16; 'subject:media': 0.16; 'subject:windows': 0.16; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'driver': 0.24; 'header:Received:8': 0.24; 'looks': 0.24; 'received:bigfish.com': 0.30; 'work.': 0.31; 'code': 0.31; 'fighting': 0.31; 'option.': 0.31; 'skip:m 30': 0.32; 'device': 0.34; 'skip:d 20': 0.34; 'but': 0.35; 'url:rec-html40': 0.35; 'doing': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'url:microsoft': 0.37; 'received:10': 0.37; 'manager': 0.38; 'audio': 0.38; 'url:office': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'url:schemas': 0.38; 'url:omml': 0.39; 'url:2004': 0.39; 'success.': 0.39; 'url:12': 0.39; 'to:addr:python.org': 0.39; 'subject:player': 0.84 X-Forefront-Antispam-Report: CIP:185.34.132.54; KIP:(null); UIP:(null); IPV:NLI; H:mail.demant.com; RD:mail1.demant.com; EFVD:NLI X-SpamScore: 18 X-BigFish: VPS18(zzc85fhzz1f42h2148h1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6h208ch1f8fizz1d7338h1df219h17326ah8275bh8275dh18c673h1de097h186068hz30ih109h2a8h839hd25hf0ah1288h12a5h12bdh137ah1441h14ddh1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1b0ah1bceh224fh1cb5h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1fe8h1ff5h20f0h2152h2216h22d0h2336h2438h2461h2487h24d7h2516h2545h255eh25f6h2605h268bh26d3h27e2h28a1h1307i) Received-SPF: fail (mail31-co9: domain of sennheisercommunications.com does not designate 185.34.132.54 as permitted sender) client-ip=185.34.132.54; envelope-from=DMusiige@sennheisercommunications.com; helo=mail.demant.com ; l.demant.com ; From: Deogratius Musiige To: "python-list@python.org" Subject: Automating windows media player on win7 Thread-Topic: Automating windows media player on win7 Thread-Index: Ac9/Ao92/LcZpfCnSxeQrPxiZS+XUA== Date: Tue, 3 Jun 2014 08:10:03 +0000 Accept-Language: da-DK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.100.3.117] Content-Type: multipart/alternative; boundary="_000_A804AEE67207BF42BAF8CEC79839C8D613BF3275kbnmxexc11Deman_" MIME-Version: 1.0 X-OriginatorOrg: sennheisercommunications.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 151 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401784849 news.xs4all.nl 2931 [2001:888:2000:d::a6]:43553 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72491 --_000_A804AEE67207BF42BAF8CEC79839C8D613BF3275kbnmxexc11Deman_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi guys, I have been fighting with automating wmplayer but with no success. It looks to me that using the .OCX would be the best option. I found the co= de below on the net but I cannot get it to work. I can see from device manager that a driver is started by I get no audio ou= t. What am I doing wrong guys? # this program will play MP3, WMA, MID, WAV files via the WindowsMediaPlaye= r from win32com.client import Dispatch mp =3D Dispatch("WMPlayer.OCX") tune =3D mp.newMedia("./plays.wav") mp.currentPlaylist.appendItem(tune) mp.controls.play() raw_input("Press Enter to stop playing") mp.controls.stop() Br Deo --_000_A804AEE67207BF42BAF8CEC79839C8D613BF3275kbnmxexc11Deman_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi guys,

 

I have been fighting with autom= ating wmplayer but with no success.

It looks to me that using the .= OCX would be the best option. I found the code below on the net but I canno= t get it to work.

I can see from device manager t= hat a driver is started by I get no audio out.

What am I doing wrong guys?&nbs= p;            &= nbsp;           &nbs= p;

 

# this= program will play MP3, WMA, MID, WAV files via the WindowsMediaPlayer=

from w= in32com.client import Dispatch

mp =3D= Dispatch("WMPlayer.OCX")

tune = =3D mp.newMedia("./plays.wav")

mp.cur= rentPlaylist.appendItem(tune)

mp.con= trols.play()

raw_in= put("Press Enter to stop playing")

mp.controls.stop()

 

Br

Deo

--_000_A804AEE67207BF42BAF8CEC79839C8D613BF3275kbnmxexc11Deman_--