Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 550
Mike_NotGuilty Avatar asked Jan 16 '16 14:01

Mike_NotGuilty


1 Answers

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

like image 90
vadian Avatar answered Sep 28 '22 01:09

vadian