Replacing List and Record Tools scripting addition

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.

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

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

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

https://github.com/hhas/applescript-stdlib

1 Like

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