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

[SCRIPT] noBreak property just turns ON

Enthusiast ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Does anyone know why the noBreak property just works when it's turned ON by the script?

I tried all the ways I imagine (because the AI scripting documentation is poor) and nothing works.

 

For example, these are working:

app.selection.noBreak = true;
app.selection.characterAttributes.noBreak = true;

 

But these are not working:

app.selection.noBreak = false;
app.selection.characterAttributes.noBreak = false;

 

Adobe is really working hard on disappoint developer community.

TOPICS
Scripting

Views

325

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
Adobe
Community Expert ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

it only works if you turn System Layout ON in the Character Panel.

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
Enthusiast ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Nice, @CarlosCanto. Is there a way to check this option's status with script?

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 ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

LATEST

I looked for a way but found none unfortunately.  

 

I found out however that if you turn Auto Kern off, it works. But...there is always a but, turning Auto back on doesn't seem to work. Perhaps it does work, except the UI does not update.

 

see if it this doen't mess up your kerning

 

selection.characterAttributes.kerningMethod = AutoKernType.NOAUTOKERN;
selection.characterAttributes.noBreak = false; // it doesn't work unless Auto Kern if off or if System Layout is ON

 

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