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
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
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.
Copy link to clipboard
Copied
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.