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.
You raised this in another forum post. Why do a separate post on exactly the same topic?
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.
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.
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: