tell application "iTunes" activate set the index_list to {} set the sorted_list to {} tell source "Audio Book Library" tell playlist "Audio Book Library" set this_album to (album of first track whose enabled is true) set the master_list to the track number of every track whose album is this_album repeat (the number of items in master_list) times set the low_item to "" repeat with i from 1 to (number of items in master_list) if i is not in the index_list then set this_item to item i of master_list if the low_item is "" then set the low_item to this_item set the low_item_index to i else if this_item comes before the low_item then set the low_item to this_item set the low_item_index to i end if end if end repeat set the end of sorted_list to the low_item set the end of the index_list to the low_item_index end repeat tell application "iTunes" set this_playlist to make new playlist set the name of this_playlist to this_album set mylist to the name of this_playlist set view of browser window 1 to playlist mylist end tell repeat with i from 1 to the count of sorted_list set tracknumber to item i of sorted_list duplicate (every track whose album is this_album and track number is tracknumber) to this_playlist end repeat end tell end tell end tell