0

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!

Community
  • 1
  • 1
  • Its not clear in your question what is going wrong for you. Can you describe what is not working for you? – dcarson Dec 30 '14 at 20:34
  • Right now, when I run the script nothing happens. Fills stay at whatever they are at originally, and opacity does the same. I'm looking for a solution that will allow the script to run/function. Not sure if it's the Program versioning, I'm using Illustrator 17 (Creative Cloud). – Joseph Maximus Dec 31 '14 at 21:25

0 Answers0