Apply Setting to TextFrames and Tables inside any Group of Page Items in Document
Hi Experts,
Im Trying to Apply Setting to TextFrames and Tables (Language - Composer - Paragraph Direction - Story Direction) using InDesign ME inside any Group in the Document, the script not working and also no errors!, please help to identify the logic mistakes! ,i apperciate any help and thanks in advance, here is the script
var myDoc = app.activeDocument;
var pItems = myDoc.pages.everyItem().pageItems.everyItem().getElements();
var GroupsArray = [];
for(var j = 0; j < pItems.length; j++){
if (pItems.constructor.name == "Group") {
GroupsArray = GroupsArray.concat(pItems);
for(var i = 0; i < GroupsArray.length; i++){
if(GroupsArray.constructor.name == "TextFrame" && GroupsArray.tables.length){
//Apply Settings
//
GroupsArray.texts[i].appliedLanguage= "Arabic";
GroupsArray.texts[i].composer = "Adobe World-Ready Paragraph Composer";
GroupsArray.texts[i].paragraphDirection = 1379028068; //RTL
GroupsArray.texts[i].storyPreferences.storyDirection = 1379028068; //RTL
}
}
}
}
