views:

484

answers:

2

Hi all!

Is there a way (ofcourse there is a way, but which way) to get info about the song currently playing in iTunes on a Mac (OS 10.5.8 and OS 10.6) programmatically?

I need this for my Cocoa application.
I use iTunes 8 and Objective-C.

Thanks in advance.

+6  A: 

Use the Scripting Bridge to ask iTunes. iTunes is even the example that the docs use.

Peter Hosey
A: 

I did this - yes it works you can do lots of stuff with scripting - but what about events and event handling?

Is there a way i can hook a listener to iTunes that will notify me of say - a changing song .. or i have to go the 'timer' way?

And also - is there a way to programatically change some of the iTunes system menus - for example - add some new submenus of the menu that appears on right click over a song (like windows COM would probably allow it?)

Thanks

Martin Kovachev
You should ask these as two separate questions.
Peter Hosey