From: Tim Pease Date: 2006-07-07T01:45:22+09:00 Subject: Re: A newbie would like some code criticism, please... Works for me. Not too helpful for your particular problem, but it does narrow it down to your machine :( What version of ruby are you running? Have you tried using the Windows OLE browser to find the iTunes OLE methods? The error looks like something is wrong with the iTunes OLE bindings on your machine and not the ruby win32 hooks. I hate to even type this, but you might try reinstalling iTunes and see if the problem goes away. Blessings, TwP On 7/6/06, Tim Hoolihan wrote: > I'm trying to test the itunes code but can't get it to work? > Even the following script errors out: > > #test itunes with ole > require 'win32ole' > > itunes= WIN32OLE.new('iTunes.Application') > puts itunes.ole_methods > > > The error is: > C:\tools\scripts\test>ruby itunes.rb > itunes.rb:4:in `ole_methods': Failed to GetTypeInfo (RuntimeError) > HRESULT error code:0x8002801d > Library not registered. from itunes.rb:4 > > While ole works fine, because I can run: > require 'win32ole' > > excel= WIN32OLE.new('excel.application') > puts excel.ole_methods > excel['Visible']=TRUE > wb = excel.Workbooks.Add() > sleep 10 > excel.quit > > Any ideas? > -Tim > >