0

I'd like to have a script that does something every time the current playback changes, i.e. something different is displayed in the Now Playing widget in Notification Centre. All the solutions I found involved telling iTunes to give AppleScript the information, however, my script shouldn't work solely with playback from iTunes, but primarily Safari (SoundCloud web). Any way Now Playing data is accessible using AppleScript, independent of iTunes?

FDMS
  • 113
  • 1
  • 5
  • [Get notification using NSDistributedNotificationCenter for iTunes on song info change](https://stackoverflow.com/a/5846624/7926970) – foo Apr 05 '19 at 18:33
  • @foo I'm looking for a solution that works with playback from Safari, not iTunes. – FDMS Apr 05 '19 at 18:38
  • For your cited use case, you'd use JavaScript (inside an AppleScript) to attach an event listener to some key page element, and define a function to read the information you need from the appropriate elements. – CJK Apr 13 '19 at 10:21
  • @CJK Do you have an example or a link? – FDMS Apr 14 '19 at 05:31

0 Answers0