0

I am trying to get working in my AppleScript to show me the artist and name of song from the radio station that is playing. the code I have now works for regular music but just not the radio stations. Any ideas?

if (Application("Music").running()) {
  const track = Application("Music").currentTrack;
}

For the radio the terminal just shows me [object Application]. So not sure what I am missing

5
  • Welcome to Ask Different! This is JS, not AppleScript, right...? What API are you using for this? Is there a reason this question is better suited for Ask Different than Stack Overflow?
    – JMY1000
    Nov 24, 2020 at 9:23
  • This is applescript
    – jrock2004
    Nov 24, 2020 at 15:11
  • This doesn’t look like any AppleScript I know... how are you ruining it?
    – JMY1000
    Nov 24, 2020 at 17:23
  • osascript -l javascript ./tunes.js
    – jrock2004
    Nov 25, 2020 at 22:38
  • Gotcha, sorry for the confusion. I think the preferred term is JavaScript for Automation (JXA); sorry I didn’t quite get that at first.
    – JMY1000
    Nov 25, 2020 at 23:00

0

You must log in to answer this question.

Browse other questions tagged .