Hi, I have created app that paginates hundreds of objects (text and images).
Just to see if performances increase, I tried to disable screen redraw.
But with the following short example on doc with 10 pages, if you run the script you can see all the pages. Seems to redraw don’t has effects.
tell application "Adobe InDesign CC 2014"
activate
set enable redraw of script preferences to false
repeat with j from 1 to 10
delay 0.1 -- just to delay for see every page
set active spread of active window to spread j of active document
end repeat
set enable redraw of script preferences to true
end tell
Any suggestion?
Other possibilities are to hide open doc in the dock or open document in “invisible” mode but this has secondary effects on some script. I discarded both these two possibilities.
Hi. Screen redraw wouldn’t have any affect, as changing pages would initiate your objects’ first drawing. Hundreds is actually a fairly small amount of objects, and I’m not sure what secondary problem you might have with simply hiding the window. If there’s a legitimate need to see what’s happening, then you might try dialing back the display performance to “fast”.
tell application "Adobe InDesign CC 2014"
set enable redraw of script preferences to false
repeat with j from 1 to 100
set y1 to random number from 10 to 150
set x1 to random number from 10 to 100
set y2 to random number from 160 to 287
set x2 to random number from 110 to 200
make new rectangle at page 1 of active document with properties {geometric bounds:{y1, x1, y2, x2}}
end repeat
set enable redraw of script preferences to true
end tell
Disabling screen redraw isn’t equivalent to hiding objects; it just stops certain refreshes from occurring. I doubt you’d get any performance benefit from toggling it, and it could cause problems by masking changes. If there are complex, high-res graphics or scads of text, then lowering the display performance—or hiding the document altogether—could be of benefit. If there’s a slowdown somewhere with just 100 items, then I suspect a methodology problem. You should escape your standard addition calls, as each one is currently throwing a silent error.
thanks for your feedback.
I supposed that disabling screen redraw will disable the drawing objects on the page reducing the time and show all objects only at the end of process or page.
About performances, for example if palette of INDD pages is opened during pagination, this dramatically increase the time necessary because for each changes InDesign recalculate the thumbnail.
No, the app works beautifully, but I’m “maniac” of performances and I was thinking of reducing the total time necessary to paginate everythings.
I don’t use standard additions calls inside a tell InDesign block.
I used only in the sample that I quickly build, for generate objects on page and trying the disable screen redraw.