Find My Purchased Music
How to Run the Script
Option 1: Run the script with Script Editor
You can run Find-My-Purchased-Music.scpt as-is using Script Editor, which is already installed on your Mac. Just download the file, double-click it and click the Run button (circled in red in the image below) in Script Editor.
Option 2: Save the script as an application
You can also save the script as an application and then run the application by double-clicking it. Follow these steps to save it as an application.
- Download the script and double-click it to open it in Script Editor.
- In Script Editor, click File > Export.
- Select a folder, give the application a name and select "Application" for the File Format. Then click Save.
After you've saved the script as an application, just double-click the application to run it.
The application will ask for permission to control the Music app the first time you run it. (It won't ask for permission if you run the script in Script Editor.)
Select one or more playlists
The first thing the script (or application) does is ask you to select one or more playlists.
- To select multiple playlists, hold down the command (⌘) key and click each playlist.
- If you want to analyze all of your music, select Library or Music.
Select the output format
The script will output the list of songs as an HTML file or a tab-separated values (TSV) file. Select TSV if you want to open the file in Excel, Numbers or another spreadsheet application.
The script will now start analyzing the songs in the selected playlist(s). Depending on the number of songs to analyze, the script may run for a few seconds or a few minutes.
If you save the script as an application and run the application, a dialog will show the progress. (It may initially be hidden behind other windows on your desktop.)
If you run the script in Script Editor, the progress is shown in the lower left of the Script Editor window.
The output file is saved on your desktop. When the script finishes, a dialog will show the name of the file.
Modifying the script
.scpt extension and run it from Script Editor. (If you use Visual Studio Code, you can install the AppleScript extension and run the script in Visual Studio Code.)
The code is released into the public domain. (See the LICENSE file.)