Reply To: Seeking Script to Turn Off All Ligatures and Hyphenations

#89163
Sean Carter
Member

Thanks Gert, but that looks like the script that was referenced in my link — and it wasn’t working for me.

There has been a reply in the original link I posted that is working just fine. For anyone else who might need it as well:

Save the following as “Turn ligatures off.jsx”

var scriptName = “Turn ligatures off”,
doc;

PreCheck();

//===================================== FUNCTIONS ======================================
function Main() {
var allParStyles = doc.paragraphStyles;

for (i = 1; i < allParStyles.length; i++) {
allParStyles[i].ligatures = false;
allParStyles[i].hyphenation = false;
}
}
//——————————————————————————————————————————————————–
function PreCheck() {
if (app.documents.length == 0) ErrorExit(“Please open a document and try again.”, true);
doc = app.activeDocument;
if (doc.converted) ErrorExit(“The current document has been modified by being converted from older version of InDesign. Please save the document and try again.”, true);
if (!doc.saved) ErrorExit(“The current document has not been saved since it was created. Please save the document and try again.”, true);
Main();
}
//——————————————————————————————————————————————————–
function ErrorExit(error, icon) {
alert(error, scriptName, icon);
exit();
}
//——————————————————————————————————————————————————–

This article was last modified on October 19, 2016

Comments (0)

Loading comments...