Thread View: adobe.scripting.indesign
1 messages
1 total messages
Started by David_Milson
Sun, 08 Feb 2009 17:43
Paragraphs2txtFrames script trouble
Author: David_Milson
Date: Sun, 08 Feb 2009 17:43
Date: Sun, 08 Feb 2009 17:43
18 lines
1506 bytes
1506 bytes
Hi,
I've tried to adapt Peter Kahrel's script "footnotes2txtframes" from his excellent book on INDESIGN for my own problem.
From a long list of figures (separated by paragraph returns) in a single story, I want to move each paragraph into a separate textframe.
Later, I use these frames as captions for images in the 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 reference to paras in a story var myParagraphs = myDoc.stories[0].paragraphs[i].contents; for( var j = 0; j < myParagraphs.length; j++ ) { // create new text frame for each 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads