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

Find and replace text Change Grep Turn off hyphenation

Enthusiast ,
Sep 20, 2023 Sep 20, 2023

Copy link to clipboard

Copied

Wanted to add this to the forums, I was looking for a solution to turn off hyphenation for a textbox but it is unavailable to ChangeGrepPreferences from what I can find. Running a simple Grep Find will work where [0] could be looped through each find. Including but commented out lines of change just for additional context.

app.findGrepPreferences.findWhat = "FIND_TEXT";
app.activeDocument.findGrep()[0].parentStory.hyphenation = false;
//app.changeGrepPreferences.changeTo = "REPLACEMENT_TEXT";
//app.activeDocument.changeGrep();


As an example of normal attribute syntax, below is justification.

app.changeGrepPreferences.justification = Justification.LEFT_ALIGN;
TOPICS
Scripting

Views

96

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
no replies

Have something to add?

Join the conversation