Article View: adobe.scripting.indesign
Article #8438Re: Convert empty text frames to "unassigned"
From: Dave_Saunders
Date: Fri, 13 Oct 2006 17:37
Date: Fri, 13 Oct 2006 17:37
23 lines
1294 bytes
1294 bytes
Ah! I was using ESTK and accidentally running the scripts against InCopy instead of InDesign. InCopy doesn't like you changing a story into a rectangle!
But there is the same typo in both versions. Here's what they should read:
myStories = app.documents[0].stories;
for (var j = myStories.length - 1; j >= 0; j--) {
if (myStories[j].textFrames.length == 1) {
myStories[j].textFrames[0].contentType = ContentType.unassigned;
}
}
and
myStories = app.documents[0].stories;
for (var j = myStories.length - 1; j >= 0; j--) {
if (myStories[j].content == "") {
myStories[j].textFrames.everyItem().contentType = ContentType.unassigned;
}
}
Dave
Technical Details
Message-ID:
<3bc1f4d8.6@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.6@webcrossing.la2eafNXanI> Date: Fri, 13 Oct 2006 10:37:44 -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