
1. Re: How to perform basic mathematical calculations on indesign templates
Jump_Over Sep 30, 2014 11:16 PM (in response to Harsha Sridhar)Hi,
Do mathematical calculations in javascript and fill InDesign text.contents with result as a string.
Jarek

2. Re: How to perform basic mathematical calculations on indesign templates
ALUED Oct 5, 2014 10:22 PM (in response to Jump_Over)I was looking for a script that did a calculation on numbers in my doc (in this case, subtracting 1 from a bunch of numbers in various formats  x, y, z or x ^t y ^t z ^t i.e. in a table) & I just found this fab script & I wish I had found that ages ago  is going to save me an immense amount of time!! It may be able to help you.
http://indesignsecrets.com/freescripttochangeallnumbersinadocumentusingmath.php

3. Re: How to perform basic mathematical calculations on indesign templates
Harsha Sridhar Oct 10, 2014 3:02 AM (in response to Jump_Over)Hi,
Thank you for the suggestion. I did write a javascript to perform the action using HTML and Js and embedded that into the template(via Object>Insert HTML option). The main problem is I need to access other elements/frame when I perform the action. Its similar to adding an item into a cart on any shopping website(I am clicking on "buy now" that in turn will add the item to cart and display some sort of icon which indicates that there are items in the cart). I tried looking for some resources which could explain the basics of how to write scripts and make them work on the template but no luck.
Need help !!!!
PS: I am very new to Indesign, and have a very limited knowledge on scripting in the Indesign tool.
Thanks in advance

4. Re: How to perform basic mathematical calculations on indesign templates
Tropical Fool Mar 10, 2015 4:59 PM (in response to Harsha Sridhar)I just found this .js script that pretty much handles the math I need in InDesign.
For calculations like sums:
Calculs Raynaux  Script de calcul dans tableaux Indesign CS
The documentation is in French, but it's so easy to use, I doubt that will be a problem.

5. Re: How to perform basic mathematical calculations on indesign templates
Aquoibon Jan 21, 2016 1:59 AM (in response to Tropical Fool)It won't be a problem …
Since 2016, Calculs Raynaux is in version 3.02, always simple, with more features AND available in english, french and german.
Calculs Raynaux  Script de calcul dans tableaux Indesign CS
Enjoy (and donate ;))

6. Re: How to perform basic mathematical calculations on indesign templates
Aquoibon Mar 14, 2016 3:55 AM (in response to Aquoibon)New version (3.03) for Calculs Raynaux !
Calculs Raynaux  Script de calcul dans tableaux Indesign CS
Enjoy (and donate ;))

7. Re: How to perform basic mathematical calculations on indesign templates
Aquoibon Sep 14, 2016 5:44 AM (in response to Aquoibon)Another new version is available : 3.04 at the same address :
Calculations Raynaux  Calculation in tables Indesign CS Script
Enjoy !