Log your played iTunes tracks

Posted on Jul 24, 2016

A few days ago I was looking for a way to log all tracks that I listen to in iTunes. Something like Last.fm but that works local and for macOS. I did a quick search and couldn’t find anything (maybe there is something already). So I decided to built something simple on my own using AppleScript, which allows me to easily access the iTunes information I need.

Doing some research I found an article at Doug’s AppleScripts that described the problem I wanted to solve. Copy the code below in the Script Editor (or get from GitHub), change the path to the text file and save as an application and don’t forget to check the “Stay open after run handler”.

Run the app and voilà! I haven’t looked into possibilities to hide the dock icon or anything else. And I guess you can run the code with some modifications as a shell script in the background. Maybe I’ll look into it later.