Answered
how to change indesign composer

I will change world ready single-line composer

I will change world ready single-line composer
Try the following
var myDoc = app.documents[0];
var para = myDoc.allParagraphStyles;
for (var i = 0; i < para.length; i++)
{
if(para[i].name != "[No Paragraph Style]")
para[i].composer = "Adobe World-Ready Single-line Composer";
}
As a practice we should not also change the properties of Basic Paragraph Style, so the above code can be changed accordingly by adding the condition to the if statement. The reason your code was failing was that it would change the No Paragraph Style as well which is not permissible.
-Manan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.