Copy link to clipboard
Copied
I use this script to rename the styles:
https://github.com/jalbertbowden/indesign-scripting/blob/master/RenameStyles.jsx
And it gives me results of ascending geometric numbers.
123, 123456, 1234567, and so on.
I want normal numbering from 1 and up, as many styles as there are.
What do I need to update here, to achieve this result?
Thanks!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
var allps = app.activeDocument.allParagraphStyles;
var i = allps.length;
while(i-- && i > 1) { //skip null and basic style
allps[i].name = (i-1).toString();
}