Copy link to clipboard
Copied
Hi everybody
Can you please help me for the below script :
I have a document where i have to split the text of each spread by paragraph, so i'm using the script split.text for that!
 
Can this be done by an script, like go on the first page, select the text and run the script split text, and go the same for the other spreads.
i'm trying the below but don't know how to continue!
var myObjectList = app.activeDocument.textFrames.everyItem().getElements()
Thanks
Copy link to clipboard
Copied
The latest version of InDesign comes with a script I wrote, called "Break Text Thread." It's in the "Community Scripts" folder in the Scripts Panel. Check out that code, it shows a lot of ways of breaking the text threads between frames.
HTH,
Ariel
Copy link to clipboard
Copied
Hi Ariel,
Thanks for your reply, i know that script, its very useful. As its name says, it Breaks Text Thread.
But for my case, i need to break the paragraphs to text box.
As you can see below:
Actually i have to go on each page, select all run the script Split Text and do the same for each pages,
thats why i wanted to automate this process.
Thanks
Copy link to clipboard
Copied
I'm not familiar with the SplitText script. But if you can turn it into a function that accepts a single text frame as a parameter (rather than relying on the current selection), you can then loop through all text frames in the document (and the little code snippet you post above is a good start for a getting an array of all those text frames) and call the SplitText function with each frame in turn.
Copy link to clipboard
Copied
I'm a beginner in scripting, thats why i have posted it here to see if someone could help me to complete the script i have started to call the SplitText.
Copy link to clipboard
Copied
From where did you get this script? Unless we see the script we can't help you more. As Ariel pointed its not a complex change at first look you just need to change the code from selection to accepting objects for which you already have posted the code.
If you bought this script its better you ask the developer to make this change for you
-Manan
Copy link to clipboard
Copied
i have downloaded that from the net.
As you can see on the first screenshot, its a jsx.bin, so i can even edit it !
Copy link to clipboard
Copied
In that case i think you will have to contact the original developer. if this was a script without UI then we could call it within a loop by altering the selection as needed, but here the script is triggered by the ok button so it's not possible to control it externally
-Manan
Copy link to clipboard
Copied
Thanks for reply and for your help
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more