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 == ???)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.