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

Script to Add a counter on the Page

Explorer ,
Aug 22, 2020 Aug 22, 2020

I want to add a script in InDesign that 

add a counter on every page(i do  not want to number pages).

Basically i am making a puzzle book and want to number my puzzles as well as number their solutions.
I can have multiple instances of it on a single page . For example 1,2,3,4 for top left corner, topright corner, bottom left corner, bottom right corner respectively. 

so i need a script that ask for 2 parmeter
1   where to start numbering like start from 1 or 5 or 100......
2   increment like incrment of 1 means 1,2,3,4,5........ Increment of two means 2,4,6,8,.......

I add it on my master page(like we do to number the pages) and my sequance goes on automatically according to specified parameters.
I can make algorithm but do not even know name of the prgramming language used for writign scripts.
So i need your help. 

TOPICS
Scripting
865
Translate
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 ,
Aug 22, 2020 Aug 22, 2020

You raised this in another forum post. Why do a separate post on exactly the same topic?

Translate
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
Explorer ,
Aug 23, 2020 Aug 23, 2020

 because I want to write a simple Script for this instead of using cross references. It will save me from lot of hassel as you have already mention in my other post that it'll be paint if i have more than 10 such referencs to make. and I have 200+ such references to make so i thought it'll be easier to make a script. it could be more if i decide to have a book that has say 500 puzzles. 

Translate
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 ,
Aug 23, 2020 Aug 23, 2020

You can script the insertion of cross-references, that was my point in the other post.

InDesign doesn't have any counters (other than paragraph numbering, but that won't work well for your purposes (probably). Your only option is then to hard code the numbers of the puzzles and the numbers of their solutions. Use paragraph styles judiciously so that a script can match puzzle titles and the titles on the solution pages, then the script can insert the page reference on the puzzle pages. That's in fact simple enough, but it means that when you add a puzzle somewhere or remove some, you need to run the script again. Which is not much of a problem.

But when you don't know the name of the programming language used for writing scripts, maybe you should investigate that first.

Translate
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 ,
Aug 23, 2020 Aug 23, 2020
LATEST

You could use threaded text that uses bullets and numbering that has a paragraph style assigned to it that can then be used with the table of contents feature.

Additionally, you may wish to consider a product from ID-Extras that makes a live TOC: https://www.id-extras.com/products/livetoc/

or if you need to make anchors out of all of the numbers for cross referencing later, consider this script from roland dreger:

https://www.rolanddreger.net/de/95/lesezeichen-hinzufuegen-per-script/#

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Translate
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