Did anyone managed to trigger /wait for smart text reflow using scripting, in a usefull manner?
here is a bit of my code:
//find docType headers and apply keep app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING; app.findTextPreferences.findWhat = "<docType:TaggedRTF>"; app.changeTextPreferences.startParagraph = StartParagraph.NEXT_ODD_PAGE; myStory.changeText(); //fix tables if (myStory.tables.length) { /// proceess tables, code too long, not important } } // wait for smartReflow // how? it seems to be triggered only on idle? //now check if story overflows if (myStory.overflows) { alert('This story has overset text. Please fix before running WordRunner'); }else{ // no overflow, proceed with breaking stories
I always get to the alert. Smart reflow only starts after the script has stopped running.
so.. how to wait for smart text reflow?
i tried using $.sleep .. won't work
i tried to see if a backgroundTask isn't triggered... it isn't.
i'm lost, and very much annoyed.
My only option, for now, is to ask the user to click a button after the text has reflowed. And that sucks!
please please please someone help!