Skip to main content
daitranthanhoa
Inspiring
March 31, 2016
Question

Why can't turn off hyphenation by Script?

  • March 31, 2016
  • 1 reply
  • 405 views

If hyphenation =false , set hyphenation =true , it is ok.

But hyphenation =true, can't set hyphenation = false.

My code: oTF.textRange.paragraphAttributes.hyphenation = false;

Why can't turn off hyphenation  by Script?

This topic has been closed for replies.

1 reply

pixxxelschubser
Community Expert
Community Expert
March 31, 2016

I wonder why?

alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation);

if (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation == true) {

    app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation = false

    }

alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation);

This works very well.

daitranthanhoa
Inspiring
April 1, 2016

This works very will with version EN, not work with version JP

  1. alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation); 
  2. if (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation == true) { 
  3.     app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation = false 
  4.     } 
  5. alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation); 

If you try this code, it will not working in version EN:

  1. alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation); 
  2. if (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation == false) { 
  3.     app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation = true
  4.     } 
  5. alert (app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation);

I think, the cause we can't set hyphenation or any attributes, if all attributes of Paragraph the same setting of Paragraph style.

Larry G. Schneider
Community Expert
Community Expert
April 1, 2016

Japanese doesn't use hypenation.