I have a script that changes few characters' settings, but when I run it, it doesn't work on text in tables.
This is the script:
var myDoc= this.activeDocument;
//changing composer, language and Para direction
myDoc.stories.everyItem().composer = "Adobe World-Ready Paragraph Composer";
myDoc.stories.everyItem().appliedLanguage = app.languagesWithVendors.item("Hebrew");
myDoc.stories.everyItem().paragraphDirection = ParagraphDirectionOptions.rightToLeftDirection;
myDoc.stories.everyItem().hyphenation = false;
myDoc.stories.everyItem().characterDirection = CharacterDirectionOptions.defaultDirection;
myDoc.stories.everyItem().keyboardDirection = 1147496036;
allTablesContents.composer = "Adobe World-Ready Paragraph Composer";
You have to address the text in table cells in a second step.
Also footnotes or cells in nested tables.
Example for all NOT nested tables:
var allNOTnestedTables = app.documents.stories.everyItem().tables.everyItem().cells.everyItem().texts; allNOTnestedTables.composer = "Adobe World-Ready Paragraph Composer";
Instead of using the string "Adobe World-Ready Paragraph Composer" better use the locale independent string:
"$ID/HL Composer Optyca".
Even better: Change the applied paragraph styles and character styles.
Never change paragraphStyles and paragraphStyles !!!
Why do you expand the Application object with prototype.main ?