Dr.Altaica has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to get perl to play MP3 thru a Windows box. My first thought as to use MediaPlayer. Looked up the info for the Windows Media Player control off of MSDN, made a quick script with Win32::OLE and got nothing. Add strict and warnings and I find out
$app->{'controls'}->Play()
is giveing me
Win32::OLE(0.1502) error 0x80020003: "Member not found"
    in METHOD/PROPERTYGET "" at mp3.vbs line 6

It seem I'm geting the seems $app->{'controls'} is ju returning $app Player object instead of $app's Controls object. Controlling Windows Media Player from Perl or how to find OLE methods easily So what am I doing wronge?

sreahing PerlMonks only turned up Controlling Windows Media Player from Perl or how to find OLE methods easily whitch wasnt usefull.
use strict; use warnings; use Win32::OLE; my $app = Win32::OLE->CreateObject('{6BF52A52-394A-11d3-B153-00C04F79F +AA6}'); $app->{'URL'} = "http://www.dailywav.com/0403/toothpasteshampoo.wav"; my $cont = ($app->{'controls'}); print "his:" . $app->{'URL'} . "\n"; print "his:" . $app->{'controls'}->{'URL'} . "\n";
|\_/|
/o o\
(>_<)
 `-'

update (broquaint): title change (was Win32::OLE + MediaPlayer == ???)

Replies are listed 'Best First'.
Re: Using Perl to Play MP3s on Windows
by AcidHawk (Vicar) on Apr 11, 2003 at 12:43 UTC

    Have you tried with WinAmp.

    I did a quick search on Google for perl control winamp and found a few rather interesting bits.

    Take a look at the last post of this archive there may be something there.

    There is even a Winamp-Control module on CPAN which might also be worth a look

    -----
    Of all the things I've lost in my life, its my mind I miss the most.