When hunting around for a solution to make life a bit easier with a specific job I came across someone who wrote a script that should do exactly what I need. The problem is I have no idea how to make this script into a .jsx file that will work in Indesign.
I am using the latest version of Indesign CC.
I copied and pasted the info from the website into textedit. I then saved as an RTF as txt is not an option. I then changed the extension to .jsx and put it in the appropriate folder. Indesign shows it but it is greyed out. I am assuming I have done something wrong here. Is there a correct way I should be making a .jsx file on a Mac?
This is the script I want:
(function () {
var curDoc = app.activeDocument,
allPages = curDoc.pages,
nPages = allPages.length,
curPage,
i,p,
newMaster = curDoc.masterSpreads.itemByName("B-Masterpage");
for (i = nPages-1; i >= 0; i--) {
curPage = allPages[i];
p = curDoc.pages.add({appliedMaster: newMaster});
p.move(LocationOptions.AFTER, curPage);
}
}) ();
I am using the latest version of Indesign CC.
I copied and pasted the info from the website into textedit. I then saved as an RTF as txt is not an option. I then changed the extension to .jsx and put it in the appropriate folder. Indesign shows it but it is greyed out. I am assuming I have done something wrong here. Is there a correct way I should be making a .jsx file on a Mac?
This is the script I want:
(function () {
var curDoc = app.activeDocument,
allPages = curDoc.pages,
nPages = allPages.length,
curPage,
i,p,
newMaster = curDoc.masterSpreads.itemByName("B-Masterpage");
for (i = nPages-1; i >= 0; i--) {
curPage = allPages[i];
p = curDoc.pages.add({appliedMaster: newMaster});
p.move(LocationOptions.AFTER, curPage);
}
}) ();
via ehMac.ca https://ift.tt/2W4zY2t
Aucun commentaire:
Enregistrer un commentaire