Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

White fill text overprint need to be select

Explorer ,
Nov 22, 2018 Nov 22, 2018

I need your help. I am new to write the javascript.  I need to select the white text with overprint enabled (White means: C=0, M=0, Y=0, K=0).

I am writing the script but I don't it is not working properly. kindly highlight my error or advice me. 

Reference script below: 

#target illustrator-21

function fillColorOp(){

    var doc = app.activeDocument;

 

    doc.selection = null;

  

     for(var i=0; i < doc.textFrames.length; i++)

  

     var thisTf = doc.textFrames;

  

     {

          for ( var j = 0; j < thisTf.textRanges.length; j++ ) 

       

          var thisTr = thisTf.textRanges;

          {

              if(thisTr.characterAttributes.fillColor &&

           

              (Math.round(thisTr.characterAttributes.fillColor.cyan) == 0) &&

           

              (Math.round(thisTr.characterAttributes.fillColor.magenta) == 0) &&

           

              (Math.round(thisTr.characterAttributes.fillColor.yellow) == 0) &&

           

              (Math.round(thisTr.characterAttributes.fillColor.black) == 0) && (thisTr.characterAttributes.fillOverprint))

           

              {

               

                  thisTr.selected = true;

                     

                  };

           

              };

       

          };

   

      };

  fillColorOp();

Thanks in advance

Kalaimani.S

TOPICS
Scripting
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Nov 23, 2018 Nov 23, 2018

Salut Kalaimani

Strictement ce que​ tu as demandé,

// JavaScript Document

#target illustrator

function fillColorOp(){

  var thisTf, color;

  var doc = app.activeDocument;

      doc.selection = null;

        for (var i = 0; i < doc.textFrames.length; i++) {

          thisTf = doc.textFrames;

          color = thisTf.textRange.characterAttributes.fillColor;

            if (thisTf.textRange.characterAttributes.overprintFill) {

              if(!color.cyan && !color.magenta && !color.yellow && !color.black) {

  

...
Translate
Adobe
Advocate ,
Nov 23, 2018 Nov 23, 2018

Salut Kalaimani

Strictement ce que​ tu as demandé,

// JavaScript Document

#target illustrator

function fillColorOp(){

  var thisTf, color;

  var doc = app.activeDocument;

      doc.selection = null;

        for (var i = 0; i < doc.textFrames.length; i++) {

          thisTf = doc.textFrames;

          color = thisTf.textRange.characterAttributes.fillColor;

            if (thisTf.textRange.characterAttributes.overprintFill) {

              if(!color.cyan && !color.magenta && !color.yellow && !color.black) {

                  thisTf.selected = true;

              }

            }

        }

}

  fillColorOp();

de elleere

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 26, 2018 Nov 26, 2018

It is working good on fill color text but is not working with the appearance...Thanks a lot.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 26, 2018 Nov 26, 2018

Hi... kalaimanis71535121​, I asked you here... Preflight Pre-Press

What did you mean by appearance?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2018 Nov 26, 2018

My guess is similar to this, however we need that clarified as I may be wrong:

appearance.png

P.S. Kudos for your work in that other linked topic!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 26, 2018 Nov 26, 2018
LATEST

We are filled are stroked it appears on appearance palate. Snapshot for your reference.

(Note: hight lighted color is white).

Test file has attached: https://drive.google.com/open?id=1LFJEkjDTFRtI7C8LdYvZr58jpOa4Zgxm

Screen Shot 2018-11-26 at 6.07.50 PM.png

Thanks and regards.

Kalaimani.s

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2018 Nov 26, 2018

For me, the obvious addition would be:

thisTf.textRange.characterAttributes.overprintFill = false

However text with white overprinting strokes and vector paths with strokes or fills that were overprinting white would also benefit from the same treatment...

EDIT: Ah, that other linked topic answers those questions… Fantastic stuff!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines