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

Has anyone created a progress bar using UXP scripting yet

Community Beginner ,
Apr 24, 2023 Apr 24, 2023

Copy link to clipboard

Copied

Until now, a new windows for a progress bar was instantiated using

var w = new Window(…)
However, using the new UXP developer tools, I get the folling error:

Uncaught ReferenceError: Window is not defined

So my question is: how can I create a progress bar when writing .idjs javascript files?

best

Peter

 

TOPICS
How to , Scripting , UXP Scripting

Views

616

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 ,
Apr 24, 2023 Apr 24, 2023

Copy link to clipboard

Copied

Hi Peter,

Building UI with UXP requires HTML Window. You can find sample here:

https://developer-stage.adobe.com/indesign/uxp/uxp-scripting-samples/

Once that said, I just tried adding a progressbar (the native object) and my Indesign just crashed (even needed a restart).

So it seems hazardous to say the least. 
If you are brave enough, you can maybe trick it using a pseudo progressbar => div.
HTH

Loic

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
Community Beginner ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

t

Thx Loic, this info is very helpful.

Looking forward to see more examples popping up in the future. I did not do front end HTML/CSS programming yet.

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
Adobe Employee ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

LATEST

Hi Peter,

 

I asked the InDesign team and they confirmed that the progress bar isn't available yet in InDesign UXP scripting:

 

 progress bar would work by creating a progress  element and attaching it to the dialog

 

// The code below can be added to the dialog sample which is shared 
// Assuming `div` as a div element in the dialog
let progressBar = document.createElement("progress");
div.appendChild(progressBar);
progressBar.value = 0.2;

 

It is currently available in Photoshop UXP... here's some documentation.

 

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