abracadabraPDF › Forums › PDF – Général › Barre de progression ou app.thermometer › Répondre à : Barre de progression ou app.thermometer
29 octobre 2017 à 13:37
#62961
Maître des clés
Bonjour.
C’est bien ce qu’il utiliser : app.thermometer
Exemple extrait de la doc JS Reference :
Code:
// This example shows how to use all properties and methods of the Thermometer object.
var t = app.thermometer; // Acquire a thermometer object
t.duration = this.numPages;
t.begin();
for ( var i = 0; i < this.numPages; i++)
{
t.value = i;
t.text = « Processing page » + (i + 1);
if (t.cancelled) break; // Break if the operation is cancelled
// … process the page …
}
t.end();
var t = app.thermometer; // Acquire a thermometer object
t.duration = this.numPages;
t.begin();
for ( var i = 0; i < this.numPages; i++)
{
t.value = i;
t.text = « Processing page » + (i + 1);
if (t.cancelled) break; // Break if the operation is cancelled
// … process the page …
}
t.end();
Mais… Mais… Afficher une barre de progression pendant des opérations longues a aussi comme conséquence de les ralentir…
:Smiley03:
