The script in question is
set NumbersList to {5, 10, 15, 30, 5, 10, 35, 40, 50, 5}
set SecondaryTrails to {}
repeat (count NumbersList) - 1 times
repeat with i from 1 to the number of items in NumbersList
set ObjCompared to NumbersList's item 1
set SecondList to the rest of NumbersList
repeat with i from 1 to the number of items in SecondList
set theObj to SecondList's item i
if theObj = ObjCompared then
if ObjCompared is not in SecondaryTrails then set beginning of SecondaryTrails to ObjCompared
set SecondaryTrails to SecondaryTrails & theObj
set {theObj, ObjCompared} to {missing value, missing value}
end if
end repeat
end repeat
set NumbersList to the rest of NumbersList
end repeat
return SecondaryTrails
It fails to save with alert “Script Debugger can’t save the document”. I don’t understand why. macOS Lion 10.7.5. I could only save it as text.