Hi I wonder if you guys might be able to help. I have been learning scripting over the past couple of weeks so i’m still really new to this and tying to get my head around everything. I’m currently trying to develop a script that i can run through a batch processor though to update the page number and file name.
example. filename “0198_Catelogue1.indd” is page 198. But i want to change this to:
filename “0201_Catelogue1.indd” is page 201.
I have managed to create a script to open a folder of .indd files, change the page numbers and then save and close the files and this works succesfully with the script below but I cannot work out a way to update the filename. Is this actually possible? I can do this separately if need be but it would be nice to have it all work as one seamless script.
//Adjust the variable of x to reflect the number you want to add/subtract from the current catelogue page
// Set the operator for the variable “pgNum” to either a + or – depending on whether you are adding or subtracting pages.
var x = 25 ;
var y = (app.activeWindow.activePage.name) – 0;
var pgNum = y + x;
app.activeDocument.sections[0].pageNumberStart = pgNum;
Another thing I would like to do is to try and implement is a prompt alert at the start. Then once the script has been actioned, it will ask the user to select the number of pages they need to amend the document by and there will be two buttons to add or remove that variable from the current page number. Ideally this would only need to be done once though so i don’t know if it would need to be done separately from a batch processor.