• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

display redraw fails when calling script from extension

New Here ,
Jul 13, 2018 Jul 13, 2018

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

TOPICS
Scripting

Views

636

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 13, 2018 Jul 13, 2018

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines