Robert at ID-TaskerCorrect answer
Legend
October 5, 2023
Anchored TextFrames are not directly listed in the Document - you would have to add one more level of everyItem():
myDoc.textFrames.everyItem().texts[0].textFrames.everyItem().texts[0].appliedLanguage = app.languagesWithVendors[3];
or something like that - I'm not JS guy so if it won't work - you'll have to wait for JS Gurus.
But why are you processing TextFrames - and not Stories?
Should work much faster - every TextFrame ALWAYS have parentStory - can't exists WITHOUT - and if Story have multiple TextContainers = TextFrames - do not confuse with Anchored / InLine TextFrames and other objects - then you'll refer to the contents of all of those containers only once.
BUT - why can't you just modify ParaStyles? If you have them correctly applied of course ...
