Using AppleScript, I can add a track to a playlist by using a command something like this:
duplicate myTrack to playlist "myPlaylist"
which works fine. However, if the playlist is currently playing, that track will never be played. How can I add a track to a playlist and get it to play when the playlist gets to it (not immediately)?