Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
iTunes Script - Add Wishlist Item. Note that this information is probably out of date. It is being added here for reference/archival purposes and relates to a blog post from 2005
-- This script uses a dummy mp3 file (not supplied) to add a wishlist item to a specified playlist in your library.
-- Useful for when the track isn't available from the iTMS (and hence you can't drag this in as a wishlist item) and you want to remember to acquire it later from 'other sources'. You can use the dummy track in a playlist to act as a placeholder until you obtain it. I.e. to layout a running order, etc.
-- Use Quicktime to create a dummy mp3 file. Open a new player and just save as to create a mp3.
--Place the dummy file somewhere suitable, amend the path below
--Amend the wishlist playlist name if so desired
--This script (last time I checked) worked better when complied as an application, otherwise some Apple Event time out errors occur with the dialogs sometimes
--The script will prompt for a name, artist and album when run.
tell application "iTunes"
set win to front browser window
tell win
display dialog "Add placeholder file" & return & return & ¬
"Track Title:" default answer ""
set track_title to the text returned of the result
display dialog ¬
"Artist:" default answer ""
set track_artist to the text returned of the result
display dialog ¬
"Album:" default answer ""
set track_album to the text returned of the result
-- add dummy track, change location to suit
add "Powerbook HD:Users:you:Music:temp.mp3"
end tell
--change wishlist to whatever your wishlist playlist is calledr
duplicate track "temp.mp3" of playlist "Library" to playlist "Wishlist"
set this_track to track "temp.mp3" of playlist "Wishlist"
set the name of this_track to the track_title
set the artist of this_track to the track_artist
set the album of this_track to the track_album
set enabled of this_track to false
end try
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.