@markh , I used your example script on all the style overrides of a document with a few symbols. The idea was to be able to swap layer style overrides with others from another library. It worked perfectly with a value from a foreignLayerStyle.
But I have found a problem, the overrides.value and the foreignLayerStyle.localSharedStyle.objectID (with which it matches) seem to be generated again by each new document. If you copy/paste the instance to a new document, it will have a different value. Also, the string previously used with success in set override value will not work π
Then, it is impossible to know what value I should apply. Is there any other way to replace a layer and text style override without using overrides.value? Or a way to know these values without having all the foreignLayerStyles from a library in the current document?