Question
Problem with a step by step live " animation"
Hi everyone!
I am a beginner in InDesign scripting,
I am a beginner in InDesign scripting,
I can't solve this embarrassing problem...
When I create an "animation" step by step, my animation runs well live on my screen.
In the example I add +1 in tracking each segond, and the "animation" is well done in live in Indesign
But when I add an alert before my fuction, or any other UI script element, or a simple Script Ui with a button to run my script, my script works but it does not "animate" anymore.
Another strange thing, when I run my script from Visual Studio Code the animation works, but when I run my script directly via the indesign script panel, sometimes the animation doesn't run even if I don't have any popup dialog before
Thank you in advance for your response,
(This message was translated with a translator, sorry for the potential problem of translation, I hope my message was clear)
0zera
// the animation works without the alert,
// but when I add the alert my script works but it does not animate anymore
alert("Animation")
function animation() {
for (var i = 0; i < 15; i++) {
$.sleep(1000)
app.selection[0].tracking = i;
}
}
animation();