I want to display a current track title with Cocoa.
For now I could get the playing title with Scripting Bridge but I don't know how to get it just after a song is changed.
Is there any way I can hook a listener to iTunes without a timer.
Thank you.
I want to display a current track title with Cocoa.
For now I could get the playing title with Scripting Bridge but I don't know how to get it just after a song is changed.
Is there any way I can hook a listener to iTunes without a timer.
Thank you.
iTunes posts a distributed notification when the track changes. This question contains information about the notification you need to observe for, and you should be able to work out what you need to do from either the Python code in the accepted answer or the Objective-C code that the other answer links to.