Copy link to clipboard
Copied
Hi all,
I created a script that later is supposed to be called from an extension which has a user interface. The script itself works just fine, when executing it from ExtendScript Toolkit the screen updates as intended, but when executing it from the extension interface in InDesign screen updating won't work.
The screen update is initiated by
app.scriptPreferences.enableRedraw = true;
The code is all jsx, the interface is a little javascript, HTML and CSS.
I know that in terms of performance a redraw might not be best but since the script takes very long it would be great fpr the user to actually see something happen.
Maybe some of you have had similar issues or can explain the differences between executing a script from ExtendScript Toolkit and an extension.
I'm thankful for any help.
Thanks in and advance and regards
David
Copy link to clipboard
Copied
Hi David,
it also happens in ExtendScript execution that it takes a while that a redraw happens on the active spread.
I'm just thinking about a progress bar that is running to show the user that something happens, but only at the end of a very complex action the redraw is done.
Also consider document.recompose() if text updates are important.
To be absolutely sure that something is redrawn save the document, close it and reopen it.
I know, I know, this might not the best user experience…
Should someone move this discussion over to:
Extensions / Add-ons Development ?
Regards,
Uwe
Copy link to clipboard
Copied
Hi,
I think you should always prefer performance over visibility. What you describe can be solved by displaying a progress bar.
I often use Marc Autret​ 's ProgressBar's library myself :
extendscript/ProgressBar.jsx at master · indiscripts/extendscript · GitHub