Here is the Droplet i came up with. To add error correction and flexibility, I may add the following:
1. Check to see if output filename provided is already used in the output folder.
2. Get the CombinedDocument’s preferences from the first file. (it is hard coded into mine but it might not matter as mine deletes the first (blank) page.
3. Provide support for filtering filetypes
4. Provide support for dropping folders (getting the first tier results of the contents)
5. Provide a dialog that indicates broken links or overset text in the combined document on completion
on run {input, parameters}
--Choose Output Folder
tell application "Finder"
set OutputFolder to choose folder with prompt "Select a folder for output"
set myFilelist to input
set myFileCount to count of myFilelist
end tell
log myFileCount
if myFileCount > 0 then
--Get output filename
display dialog "Please provide the name for the combined file" default answer ""
set SaveNameInput to text returned of result
set SaveName to SaveNameInput & ".indd"
--Need to add check if filename already exists
tell application "Adobe InDesign CC 2017"
activate
set user interaction level of script preferences to never interact
tell view preferences
set horizontal measurement units to inches
set vertical measurement units to inches
end tell
--setup combined document
set myCombinedDoc to make document
tell document preferences of myCombinedDoc
set page height to "8.5"
set page width to "11"
set page orientation to landscape
set pages per document to 1
set facing pages to false
set allow page shuffle to false
end tell
repeat with i from 1 to myFileCount
open (item i of myFilelist)
delay 10
set myCurrentFile to the active document
tell myCurrentFile
set DocName to name
log DocName
duplicate every spread of myCurrentFile to after last spread of myCombinedDoc
close saving no
end tell
end repeat
tell myCombinedDoc
set SavePath to (OutputFolder as string) & SaveName
log SavePath
delete page 1
save to SavePath
close saving no
end tell
set user interaction level of script preferences to interact with all
beep 3
display alert "Complete" giving up after 3
end tell
else
display dialog "No IDML files to process" giving up after 3
end if
return input
end run