Forum Replies Created
-
AuthorPosts
-
hemant998
MemberSO, is it possible that i can break the row?
hemant998
MemberPeter Kahrel's script
// Description: Place multiple textfiles as one story
#target indesign
preset = '/d/test/*.rtf';
app.wordRTFImportPreferences.useTypographersQuotes = true;
app.wordRTFImportPreferences.convertPageBreaks = ConvertPageBreaks.none;
app.wordRTFImportPreferences.importEndnotes = true;
app.wordRTFImportPreferences.importFootnotes = true;
app.wordRTFImportPreferences.importIndex = true;
app.wordRTFImportPreferences.importTOC = false;
app.wordRTFImportPreferences.importUnusedStyles = false;mask = prompt ('Enter a file path/mask.rr' +
'Examples:r' +
'd:bookstest*.rtf /d/books/test/*.rtf', preset);if (mask == null) exit(); // Cancel pressed
ff = Folder (File (mask).path).getFiles (File (mask).name);
if (ff.length > 0)
{
placed = [];
missed = [];
tframe = app.documents.add().textFrames.add({geometricBounds : [36, 36, 400, 400]});
placedstory = tframe.parentStory;
app.scriptPreferences.userInteractionLevel =
UserInteractionLevels.neverInteract;
pb = initprogressbar (ff.length, 'Loading');
for (i = 0; i < ff.length; i++)
{
pb.value = i;
try
{
placedstory.insertionPoints[-1].place (ff[i]);
placedstory.insertionPoints[-1].contents = 'rr';
placed.push (ff[i].name);
}
catch (_)
{
missed.push( ff[i].name );
}
}
app.scriptPreferences.userInteractionLevel =
UserInteractionLevels.interactWithAll;
inform = '';
if (placed.length > 0)
inform = 'Placed ' + ff.length + ' files (in this order):rr' + placed.join ('r');
if (missed.length > 0)
inform += 'rrCould not place:rr' + missed.join ('r');
delete_empty_frames ();
alert( inform );
}
else
alert (mask + ' not found.');// End
function delete_empty_frames ()
{
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = 'AZ';
var empties = app.activeDocument.findGrep (true);
for (var i = 0; i < empties.length; i++)
empties[i].parentTextFrames[0].remove()
}function initprogressbar (stop, title)
{
progresswindow = new Window('palette', title);
progressbar = progresswindow.add ('progressbar', undefined, 1, stop);
progressbar.preferredSize = [200,20];
progresswindow.show ()
return progressbar;
}hemant998
MemberI am using Peter Kerhal's below mentioned script for Importing multiple DOC files. But it has been used new Indesign document and i want to use my template. So, Is it possible that script would be open template and than place all files. I want to add autoflowing option in this script only.. If possible than let me know. Pls help me.
I am working with approx 2 to 3 books daily and each book has 50 to 60 word doc files.
hemant998
MemberThanks..
This is very helpful. but all files' content is not autoflowing. Is there any solution for this?
Script has been used new Indesign file everytime. But I want to use my own templete. Is this possible?
-
AuthorPosts
