To use this, copy and paste the code into the AppleScript Editor, and save it as a Stay Open Application.
Just play a Playlist, launch the script and leave the computer and it pauses the track at the end of it. Quit the script from its Application menu like any other program when finished.
global stopTime global curTrack global remTime global firstloop on idle if firstloop then set firstloop to false return remTime - 5 else if ((current date) > stopTime) then finish() quit end if end if return 1 end idle on run set firstloop to true tell application "iTunes" set d to duration of current track set p to player position set remTime to d - p set stopTime to (current date) + remTime + 1 set curTrack to current track end tell end run on finish() tell application "iTunes" reveal current track pause end tell end finish

