Hi all,
I've tried and failed to do this myself so I'm hoping that someone or even Jongware himself can help me out. I'd previously asked this question: http://forums.adobe.com/message/2865783#2865783 and I ended up with a modified version of Jongware's CopyCutter.
Unfortunately the formatting of my document has changed so I need to modify the script to take these changes in to account. Could someone please help me?
Here is how my copy currently looks:
This is what I want to select and apply the script to:
And this is the result I'm hoping to get (Note the missing \n\n at the beginning too):
Bonus points: I'd quite like the resulting text boxes to be given an object style that I could define.
And for reference here is the script that I currently have (link at beginning of post my provide more context):
if (app.selection.length == 1 && app.selection[0].hasOwnProperty("baseline") && app.selection[0].length > 1){
app.selection[0].insertionPoints[0].contents = "\r";
app.selection[0].insertionPoints[-1].contents = "\r";
app.findGrepPreferences = null;
app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = " +";
app.changeGrepPreferences.changeTo = "\\r";
app.selection[0].changeGrep();
p = app.selection[0].parentTextFrames[0];
lh = (p.lines[-1].baseline - p.lines[0].baseline) / (p.lines.length-1);
top = app.selection[0].lines[0].baseline - lh;while (app.selection[0].length > 0){ f = app.activeDocument.layoutWindows[0].activePage.textFrames.add ({geometricBounds:[top, p.geometricBounds[3]+2*lh, top+lh, 2*(lh+p.geometricBounds[3])-p.geometricBounds[1] ]}); app.selection[0].lines[0].move (LocationOptions.AFTER, f.texts[0]); top += lh;}
app.selection[0].insertionPoints[-1].contents = "";}else
alert ("please select some text to shred");