• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Rename styles with Script - Numbering

New Here ,
Jan 18, 2023 Jan 18, 2023

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!

TOPICS
Scripting

Views

157

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2023 Jan 18, 2023

Copy link to clipboard

Copied

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 19, 2023 Jan 19, 2023

Copy link to clipboard

Copied

LATEST
var allps = app.activeDocument.allParagraphStyles;
var i = allps.length;
while(i-- && i > 1) { //skip null and basic style
    allps[i].name = (i-1).toString();
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines