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

Percentage calculation and save to conditional text

New Here ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

Hi to all. I would like ask for help in this situation. I have a book with about 300 pages. Each page has many numbers (prices). I have to calculate each selected number by 1% (num*1,01) and maybe round that number at two places up. And the result save as the condition text. Can someone please help me write a script that could do this? Thank you for any help.

TOPICS
How to , Scripting

Views

208

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

correct answers 1 Correct answer

Community Expert , Mar 18, 2021 Mar 18, 2021

1. Create two Conditional Text. 100Price, 101Price
2. Do a GREP Search to match all price, change to to create duplicate of them
3. Do a GREP Search to match the first instance of the duplicate and apply 100Price condition
4. Do a GREP Search to match the second instance of the price and apply 101Price condition
5. Hide 100Price condition
6. Run PriceAdjuster from Peter Kahrel

Done!

If you need help writing the 3 GREP for this, come back with a screen capture with hidden charcater of your price. Or how

...

Votes

Translate

Translate
Community Expert ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

Peter Kahrel has already written something like this. Check his script out here:

 

https://creativepro.com/files/kahrel/indesign/price_adjuster.html

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!

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 ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

1. Create two Conditional Text. 100Price, 101Price
2. Do a GREP Search to match all price, change to to create duplicate of them
3. Do a GREP Search to match the first instance of the duplicate and apply 100Price condition
4. Do a GREP Search to match the second instance of the price and apply 101Price condition
5. Hide 100Price condition
6. Run PriceAdjuster from Peter Kahrel

Done!

If you need help writing the 3 GREP for this, come back with a screen capture with hidden charcater of your price. Or how the price is written.

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
New Here ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

LATEST

Thank you. Process which Jean-Claude wrote will work fine for me. Once more all of you thanks!

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