[ExtendScript] app.findObjectPreferences.fillColor and strokeColor gives error
Indesign version 18.2
OS: MacOS 13.2.1
Steps to reproduce:
1. New document (assuming default swatches)
2. Run script
app.findObjectPreferences = NothingEnum.NOTHING;
app.findObjectPreferences.strokeColor = app.activeDocument.swatches[5];
Expected result:
sets strokeColor or app.findObjectPreferences to swatch[5] of document
Actually result:
throws error Exception has occurred: 30477 ×
Invalid value for set property 'strokeColor'. Expected Swatch, String or NothingEnum enumerator, but received Color.
OR if I supply a swatch name String instead of a swatch, I still get an error, so this
app.findObjectPreferences = NothingEnum.NOTHING;
app.findObjectPreferences.strokeColor = app.activeDocument.swatches[5].name;
throws error: Invalid value for set property 'strokeColor'. Expected Swatch, String or NothingEnum enumerator, but received "C=0 M=100 Y=0 K=0".

-
m1b commented
Some further info. [Rob Day noticed an interesting detail about this bug](https://community.adobe.com/t5/indesign-discussions/how-to-find-the-object-with-format-stroke-quot-unnamed-color-quot-with-tint-50-in-indesign-doc-using/m-p/13644499#M519168). If you specify the colour via another "find" object, *before* doing so via the "findObjectPreferences" object, such as:
```
app.changeTextPreferences.fillColor = app.activeDocument.swatches[5];
```then this bug won't trigger! And it won't trigger again until Indesign is quit and relaunched.