Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


[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

117

Likes

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

Copy link to clipboard

Copied

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

Likes

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?

Likes

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 Professional ,
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

 

Likes

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