This script works on a structure table in which several compounds are assigned to a cluster number. Once a table is sorted on some criteria (activity, for example), this script moves through the table taking the first instance of each cluster - effectively picking the cluster member with the highest activity. It then reports these IDs to a new list with the name of your choosing.
This script demonstrates the creation and building of a list object.