🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9344

CS1, simple JS scripting help needed!

#9344
From: jhorbury
Date: Tue, 05 Sep 2006 13:52
14 lines
1268 bytes
I need a simple JS or VBS script which cycles through the all text frames on the currently open page, and if any text frames have no contents, no fillColor and no strokeType, deletes them. I've got a simple script which deletes textFrames with no content:

var myFrames = app.documents[0].textFrames;
for (oneFrame = myFrames.length -1; oneFrame >=0; oneFrame--)
{
	if (myFrames[oneFrame].contents == "")
		myFrames[oneFrame].remove();
}

..but I can't figure out how to construct the if statement to include fill and stroke. Can anyone help?

Much appreciated!

Jim
Technical Details
Message-ID: <3bc18931.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,40bd19af254e80f3,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: jhorbury@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: CS1, simple JS scripting help needed!
Message-ID: <3bc18931.-1@webcrossing.la2eafNXanI>
Date: Tue, 5 Sep 2006 06:52:18 -0700
Lines: 18
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit