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

I need a script to find then make and apply a character style to the found text.

Participant ,
Jun 07, 2023 Jun 07, 2023

Hi

I need a script to find then make and apply a character style to the found text.

what it should find:

 

\{.+?\}

 

Note:

The text font will be different from one another in every single match, so the character style must have the font info, if there are 100 matches that will be 100 character style.

 

Thanks.

TOPICS
Scripting
277
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 ,
Jun 07, 2023 Jun 07, 2023

Check out the following discussion, it has code sample that you can use to start

https://community.adobe.com/t5/indesign-discussions/creating-a-script-to-search-and-change-character...

-Manan

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
Participant ,
Jun 08, 2023 Jun 08, 2023

I've checked it, it's good on its own but it's not what I'm looking for, I need the script to make a character style based on the found text and then apply it to the same text.

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 ,
Jun 08, 2023 Jun 08, 2023

Can you post example screen shot ?

Are you trying to create previews of installed fonts ?

 

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
Participant ,
Jun 09, 2023 Jun 09, 2023
LATEST

Here's a video to explain it better, and a sample file to test it.

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