[SCRIPT] noBreak property just turns ON

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

46

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

[SCRIPT] noBreak property just turns ON

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

47

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
Jan 05, 2021 0
Adobe Community Professional ,
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
Reply
Loading...
Jan 05, 2021 1
Enthusiast ,
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
Reply
Loading...
Jan 05, 2021 0
Adobe Community Professional ,
Jan 05, 2021

Copy link to clipboard

Copied

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
Reply
Loading...
Jan 05, 2021 1
Resources