Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

I can't replace all contents in textFrames

$
0
0

Hi.

 

I have a problem, I wrote a script thathasmereplaceallwords in the selectedtextFrameonaletter.It seems to methat everythingis fine,but once you startit turns outthat itdoes not replaceall the words.

 

 

 

var zaznaczenie =app.activeDocument.selection;

 

if (zaznaczenie[0].typename == "TextFrame" ) {

   

    $.writeln(zaznaczenie[0].contents);

    for(i=0;i<zaznaczenie[0].words.length;i++){

        var temp = zaznaczenie[0].words[i].contents;

        $.writeln(zaznaczenie[0].words[i].contents);

        var t=temp.replace (temp, "x");

        zaznaczenie[0].words[i].contents=t;

    }

}

 

 

 

 

THXScreen Shot 2015-08-10 at 09.56.58.png

 

 


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>