Hi,
I use this script for change Slider value.
but when I close script and open again the timer is not answer and I have to close and open again.
Is there a code for stopping timer function?
Gtlym = new Object();
Gtlym.CALL = new Object();
Gtlym.guid = function() {
var s4 = function() { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); };
return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4();
}
Gtlym.setInterval = function(func,millis){
this.guid = Gtlym.guid();
Gtlym.CALL["interval_"+this.guid] = func;
app.scheduleTask('Gtlym.CALL["interval_'+this.guid+'"]();',millis,true);
}
//Example:
Gtlym.setInterval(function (){timeSlider.value++;
if (timeSlider.value>=98)timeSlider.value=1;
},10);