1

Is it possible to subscribe to events using py-appscript ?

Example: I'd like to get a callback when a user changes a rating on iTunes.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
jldupont
  • 93,734
  • 56
  • 203
  • 318

1 Answers1

1

Some very few applications are recordable: that is, they'll send Apple Events to themselves which can be intercepted. iTunes is not one of these applications. iTunes does send distributed notifications for music start/stop, but not for rating changes. Assuming you don't want to patch iTunes itself, your only real choice is to parse iTunes Music Library.xml.

Nicholas Riley
  • 43,532
  • 6
  • 101
  • 124
  • thanks for your answer. Just one small note: there is no need to parse the database.xml directly though: I found the way to access the data through py-appscript. – jldupont Oct 01 '10 at 21:40
  • Of course you can do it that way too; I just meant it'd be a file you can watch for changes. – Nicholas Riley Oct 01 '10 at 21:51