I am new to JavaScript, but looking to create a script that will take the value of the fill when a halftone is set and apply that value to the opacity. Once the opacity value has been adjusted, I need the fill to reset to 100(full).
The most helpful code I've seen so far was in this article, and I've tried adjusting several ways to be consistent with some of the other scripts I use for consistency as seen here:
doc = app.activeDocument;
i = 0
var selection = activeDocument.pageItems[i];
var storedColor = activeDocument.pageItems[i].fillColor;
//apply value of stored color of individual selection to opacity
selection.opacity = storedColor[i];
selection.fillColor = 100;
This seems like it should be reasonably simple if I was clearer on what I was doing. Any help or code adjustments would be greatly appreciated. I'm trying to streamline some of the steps used in my business.
Thank you!