Search code examples
cocoaitunesappstore-sandbox

What Scripting Targets exist for iTunes?


Apple has a nice documented Technical Q&A page for implementing scripting targets for Mail.app. However, even though scripting targets also work for iTunes, there isn't a comprehensive list of available scripting targets.

Does anybody know how to find this list? The WWDC 2012 session on Secure Automation mentions a few, but it isn't comprehensive.


Solution

  • In OS X 10.9 Mavericks, you can view the com.apple.iTunes.sdef file at /System/Library/Frameworks/Foundation.framework/Versions/Current/Resources. This lists the scripting target access group associated with each AppleScript command.

    There are six access groups:

    com.apple.iTunes.device
    com.apple.iTunes.library.read
    com.apple.iTunes.library.read-write
    com.apple.iTunes.playback
    com.apple.iTunes.podcast
    com.apple.iTunes.user-interface