enableRedraw = false ignored during script run
During a loop to load text snippets to my page ID 2020 ignores the fact that enableRedraw=false and DOES redraw the page on every loop
app.scriptPreferences.enableRedraw = false;
do {
app.doScript(insertTexts2, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Insert Texts " + C2Place + ":" + V2Place);
} while (libs[8][3].geometricBounds[0] < pageTextBottom);
app.scriptPreferences.enableRedraw = true;
The text is inserted into 8 different frames -- during the loop it SHOULDN'T redraw the page -- but it does (slowing the script down)
-
Frank Fechner commented
Really, I stumbled across this exact behaviour today as may script is coppying many objects into a long multi page table and indesign scrolls along for every step. I'm pretty sure this worked years ago when I wrote this and other scripts for importing data into tables and replacing strings with anchored objects.
Many scripts from tomaxxi in the indiscripts forum have the enableRedraw set to false as well for performance reasons. so please fix this issue.
I use ID 2024 version 19.4 but this must be broken for quite a while now! -
Bev commented
I agree with Anonymous and wish that enableRedraw (or something similar) would keep ID from updating the screen while a script was running.