Article View: adobe.scripting.indesign
Article #1436Indesign para2txtframe script problem
From: David_Milson
Date: Sun, 08 Feb 2009 17:59
Date: Sun, 08 Feb 2009 17:59
35 lines
1488 bytes
1488 bytes
Hi,
I've adapted Peter Kahrel's script "footnotes2textframes" for my own problem.
I would like to move paragraphs from a list of figures in a single story to separate textframes. I use these later as captions for image files in a particular book.
Here is my adaptation:
function paragraphs2textframes()
{
var myDoc = app.activeDocument;
// process all
for( var i = 0; i < myDoc.stories[0].paragraphs.length; i++ ) {
// get text of paras in the story
var myParagraphs = myDoc.stories[0].paragraphs[i].contents;
for( var j = 0; j < myParagraphs.length; j++ ) {
// create new text frame for each note and label each frame
myTframe = myDoc.textFrames.add(
{ label : 'temp' + String(i)+String(j) } );
// move paragraph text to frame
myParagraphs[j].texts[0].move( LocationOptions.after, Story);
}
}
}
paragraphs2textframes()
Please help.
Many thanks.
David
INDESIGN CS3; XP; 4GB
Technical Details
Message-ID:
<59b7d1f3.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,da3e0bfe5178684b,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: David_Milson@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Indesign para2txtframe script problem Message-ID: <59b7d1f3.-1@webcrossing.la2eafNXanI> Date: Sun, 8 Feb 2009 09:59:02 -0800 Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit