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

Hello, I'd like to control Media Player from Perl through OLE: - Has anyone done that and how - code, example ? - What is easy way of learning about ole methods that are available for each OLE object ? If I run some spy software I get a lot of methods and features and don't know what to use - are there any more simple guides or recipe how to do that ? Thanks in advance, Robert.
  • Comment on Controlling Windows Media Player from Perl or how to find OLE methods easily

Replies are listed 'Best First'.
Re: Controlling Windows Media Player from Perl or how to find OLE methods easily
by Solo (Deacon) on Feb 23, 2003 at 16:00 UTC
    What you need is called the "object model" by M$ (which many other people might call documentation).

    Behold, the power of Google.

    --Solo

    --
    Hey, don't worry. Chewie and me got into a lot of places more heavily guarded than this.
Re: Controlling Windows Media Player from Perl or how to find OLE methods easily
by jsprat (Curate) on Feb 23, 2003 at 19:29 UTC
    As solo said, you need to find the object model.

    A good way to get started is to use the OLE Browser that is shipped with ActiveState Perl. By default, the installer creates a shortcut on the start menu. If you can't find that, mine is installed at "F:\Perl\html\OLE-Browser\Browser.html".

Re: Controlling Windows Media Player from Perl or how to find OLE methods easily
by tachyon (Chancellor) on Feb 24, 2003 at 12:47 UTC

    You can also dump the contents of your objects to see the available methods and properties. See my example for Word at Re:(Win32::OLE) Printing from Perl in Windows

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print