Article View: adobe.scripting.indesign
Article #8435Re: Convert empty text frames to "unassigned"
From: Dave_Saunders
Date: Fri, 13 Oct 2006 17:20
Date: Fri, 13 Oct 2006 17:20
21 lines
1386 bytes
1386 bytes
Robert quoted my script and suggested a different way of tackling the problem:
myStories = app.documents[0].stories;
for (var j = myStories.length - 1; j >= 0; j--) {
if (myStories[j].textFrames.length == 1) {
myStories.textFrames[0].contentType = ContentType.unassigned;
}
}
These two aren't functionally equivalent. This second version will work for any frames that are anchored to type on a path. But it won't reassign empty text frames in a threaded story even if the whole story is empty.
If you want that behavior, then use:
myStories = app.documents[0].stories;
for (var j = myStories.length - 1; j >= 0; j--) {
if (myStories[j].content == "") {
myStories.textFrames.everyItem().contentType = ContentType.unassigned;
}
}
Dave
Technical Details
Message-ID:
<3bc1f4d8.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc1f4d8.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,36cdad94baf5056 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: Convert empty text frames to "unassigned" Message-ID: <3bc1f4d8.4@webcrossing.la2eafNXanI> Date: Fri, 13 Oct 2006 10:20:43 -0700 References: <3bc1f4d8.-1@webcrossing.la2eafNXanI> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing