Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In general, it's not possible to figure out what other apps are doing with events, no. It is also not possible for you to find out when the play button in iTunes is pressed. Even if you were to catch the mouse down event, you'd have to somehow figure out whether iTunes's play button was under it at the time.</p> <p>What you can do in this case, however, is register for the notifications that iTunes posts when a track starts playing. Dave DeLong has laid it out, in <a href="https://stackoverflow.com/questions/4888816/objective-c-mac-os-x-distributed-notifications-itunes/4889556#4889556">another answer</a> here on SO. </p> <pre><code>// Register for notifications, perhaps in awakeFromNib NSDistributedNotificationCenter *dnc = [NSDistributedNotificationCenter defaultCenter]; [dnc addObserver:self selector:@selector(iTunesTrackDidChange:) name:@"com.apple.iTunes.playerInfo" object:nil]; </code></pre> <hr> <pre><code>- (void)iTunesTrackDidChange:(NSNotification *)note { NSLog(@"%@", [note userInfo]); } </code></pre> <p>This doesn't give you everything you might hope for; <a href="http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Notifications/Articles/NotificationCenters.html#//apple_ref/doc/uid/20000216-111391-BCICDDAC" rel="nofollow noreferrer">Distributed Notifications</a> are expensive, and so iTunes is frugal with them. You get a notification when a track starts playing, and that's it; no stop, no volume, no distinction between jumping tracks and starting playing from a stop. The notification does have plenty of info about the track itself, though: pretty much all the iTunes metadata, and some of the file info.</p> <p>Hope that's useful!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload