reneeb has asked for the wisdom of the Perl Monks concerning the following question:

Hi fellow monks,

I want to start the Windows Media Player via Win32::OLE. But how do I know wich "Application" I have to start?

For Excel and Outlook it is very simple:
$ex = Win32::OLE->new('Excel.Application') or die "oops\n";

Replies are listed 'Best First'.
Re: Win32::OLE-question
by jdporter (Paladin) on Oct 24, 2005 at 04:00 UTC

    From what I can tell, the thing to instantiate is 'WMPlayer.OCX.7' (or .9, depending on which you have). That makes an object of type IWMPPlayer4. But I haven't yet found any good documentation of its properties and methods.

    We're building the house of the future together.
Re: Win32::OLE-question
by planetscape (Chancellor) on Oct 24, 2005 at 07:28 UTC

    You may wish to look at Re: Win32:: OLE MS Word Table, where I mention a very nice utility called "OLE Browser" or "Type Library Browser". Under WinXP SP2, I can use this utility to get information about the Windows Media Player's Object Model, which is the logical place to start if you want to automate Windows Media Player. :-)

    There may well be other things of interest in that entire thread...

    HTH,

    planetscape
Re: Win32::OLE-question
by Anonymous Monk on Oct 24, 2005 at 07:01 UTC
    But how do I know wich "Application" I have to start?
    OLE is a microsoft product. Check on MSDN