I have a script for our newspaper that pulls comics from a folder and places them in an InDesign document. Most comics have the full date in the filename, but a few Sunday comics go by the week number for that Sunday. I.E. Blondie sunday filenames are like bln04ts.pdf or bln05ts.pdf. When we run the script we select the day to pull comics for but I'm unsure how to pull these files by week number?
Here is a sample by full date in filename if that helps at all.
` // LUANN
if (pageItem.label == "LUANN")
try{
name = "lu" + myDate.text + ".tif"
var myFile = new File(imagePath+name);
if (myFile.exists)
{
pageItem.place(myFile);
pageItem.fit(FitOptions.CONTENT_TO_FRAME);
}
name = "lu" + myDate.text + "_vacation.tif"
var myFile = new File(imagePath+name);
if (myFile.exists)
{
pageItem.place(File(myFile));
pageItem.fit(FitOptions.CONTENT_TO_FRAME);
}
name = "lu" + myDate.text + "_crx.tif"
var myFile = new File(imagePath+name);
if (myFile.exists)
{
pageItem.place(File(myFile));
pageItem.fit(FitOptions.CONTENT_TO_FRAME);
}
}catch(err){
//alert("caught error")
}`
Any ideas?