Friday, December 18, 2009

How do I OLE?

I saw a perfect example of using OLE objects in Magik session In Alferd's sworldwatch for regular expression validator (
But finding the ole component is not a simple task, if we are looking for something new. It takes good amount of time for searching the ole components like vbscript.regexp.

So we need a tool which lists all the available ole components.

Visual studio comes with Ole Viewer Tool shows list of COM objects and its properties. Which will make life easier to find the objects, What if we don’t have ..??
Here is the solution (;en-us;122244)

Download ole2view this application lists all the available COM components in WINDOWS.

Wednesday, December 2, 2009

SW Media Player

sw media player is a simple media player(only audio)
This again works using ole_automation by geting handle on windows media player activex component. ( so becomes platform dependent )

I added lot of actions but couldn't implement all...
it has the basic functionality like play, stop, ff, fr, pause.
Time seek will show the current position of the audio file but it doesn't update if we drag it.

It will work from emacs with three lines of code

.player << ole_client.create_object("wmplayer.ocx")
.control << .player.controls
.player.url << "C:\WINDOWS\Media\Windows XP Logon Sound.wav"

Serves as online radio if URL is replaced with some live radio for eg:

Download sw mdia player form here

control.stop will stop playing audio file. similarly play, pause etc are available on control class.

I tried to add play list to the tree item with add and remove functionality but finally did nothing

If found any new ideas please add to comments