Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: cleaning up text frames

$
0
0

As I mentioned, I'm trying to improve on the script so that any text box with no fill or stroke BUT with a text-wrap doesn't get deleted. I've modded the script in the following way:

 

var stroke = myTextFrames[j].strokeWeight;

var color = myTextFrames[j].fillColor.name;

var wrap = myTextFrames[j].textWrapPreferences.textWrapMode;

//alert (color)

     if (myTextFrames[j].contents == "" && stroke == "0" && color == "None" && wrap == "None"){

           //alert ("yes")

   myTextFrames[j].remove();

 

but now when running the script, nothing is deleted, including the empty textboxes with no fill, stroke or textwrap. what have I missed?


Viewing all articles
Browse latest Browse all 37788

Trending Articles



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