Replacing List and Record Tools scripting addition


(Eric) #1

In preparation to replace scripting additions like satimage and list and record tools I’ve been searching for a script library to perform the same functions—
union of
intersection of
difference of
but most of all excluding duplicates.

Before I set out to write a new library from scratch, maybe there is one out there. I looked here, macscripters, and github.

(Mark Alldritt) #2

Through ASObjC you can use Foundation’s NSMutableSet to accomplish this. Check out NSMutableSet's union, minus, and intersect methods.

(Eric) #3

Looks good. Thank you. I also see a variation that preserves order, though so far the NSMutableSet seems to be keeping things in order.

(Ed Stockly) #4

H Has also released a script library called “List” that does most of that.

(Shane Stanley) #5

Don’t rely on it — use NSMutableOrderedSet if order matters.