Search code examples
macosapplescriptitunes

AppleScript - Get complete information of current iTunes track


I'm trying to return the information of the current iTunes Track, which is playing on my computer.

I can get single informations like this:

tell application "iTunes"
get name of current track
end tell

This returns Thunderstruck for example.

But is it possible that I can get more information of the current track so it returns something like this:

"AC/DC, Thunderstruck, Iron Man 2"

Is this possible? Or do I have to create multiple scripts?

Thanks


Solution

  • To get name, artist and album

    tell application "iTunes"
        get {name, artist, album} of current track
    end tell
    

    The result is a list


    To get everything

    tell application "iTunes"
        get properties of current track
    end tell
    

    The result is a record