Are there any good solutions for capturing events from within iTunes?
I’d like to build a plugin that sits inside of iTunes and respondes to rating changes for particular songs. For Windows they have an SDK that I haven’t delved into yet, but I’d like to find something for Mac too.
Any suggestions?
As far as I know, Apple provides a free (as in zero-cost) SDK for
iTunesVisual Plug-Ins for both OS X and Windows. If you can’t get what you need through that, you could always use iTunes Apple Events scripting interface to monitor via polling from another OS X app using an OSA-compatible interface such as AppleScript or appscript with Python, Ruby, or Objective-C. That may not be what you’d like but it is documented and supported.For example, with py-appscript, here’s how to access the current track and the those in the recently played smartlist:
It’s also possible to filter on various metadata fields (open the iTunes.app scripting definition in the AppleScript Script Editor to browse):
But note that changes to ratings do not appear to affect the modification date.