Copy link to clipboard
Copied
Hi,
I have a script that activates the Dynamic Spelling so misspelled words are highlighted / wiggly under line. It can take some time for InDesign to complete this drawing on all pages. Is there a way to detect when this drawing is complete?
I had a look at backgroundTask, but it is not listed there.
P.
Copy link to clipboard
Copied
Maybe if you hide the document's window the script runs faster.
P.
Copy link to clipboard
Copied
Might an idleEvent fit ?
Copy link to clipboard
Copied
Thank you both.
I check the idleTasks too.
P
Copy link to clipboard
Copied
Hi,
A bit more information. We have a plugin that draws the wiggly lines on the PDF. The script simply activates the Dynamic Spelling and then exports to PDF. Once the PDF has been created we restore the Spelling preferences. The plugin relies on the Dynamic Spelling cache to do the drawing. The PDF creating is some times triggered before the Dynamic Spelling has completed.
P.
Copy link to clipboard
Copied
Hi P
I am wondering how the lines are draw.
Are all the words spell checked and then all the lines drawn or after each word is checked it's line is draw?
If it's the latter maybe you could use a suitably timed idle task to compare the list of spell errors from some form of kspell lists (If they exist).
If the length of the lists stay same then it might well be done.
The timing would have to be proportionate to the document length. It's not going to be 100% safe but it's a start.
HTH
Trevor
Copy link to clipboard
Copied
Hi Trevor,
Thanks. I think I will have to fix the plugin to calculate, or force the calculation of the cache.
P.
Copy link to clipboard
Copied
I see.