tellapplication "Finder"
activate
setthefoldertochoose folderwith prompt "Select a Folder with InDesign Files to be Printed" astext
setthePathtothefolderastext
settheselected_itemstoeveryitemoffolderthefolder
iftheselected_itemsis {} then
beep
display dialog "Please select a folder with InDesign files before running this script." buttons {"Cancel"} default button 1
endif
repeatwithaFileinselected_items
tellapplication "Adobe InDesign CS6"
activate
withtimeoutof 600 seconds
setuser interaction levelofscript preferencestonever interact
openaFile
telldocument 1
tellprint preferences
setactive printer presetto "Catalog Pages"
setpage rangetoall pages
endtell
printwithoutprint dialog
closesavingno
endtell
endtimeout
--might need this delay
--delay 10
setuser interaction levelofscript preferencestointeract with all
endtell
endrepeat
tellapplication "Finder"
activate
display dialog "Batch Printing is complete!" giving up after 5
endtell
endtell