View Single Post
Old 01-13-2011, 02:09 PM   #115
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Hello Ben,

The "standard-JS" windows-object isn't available to our readers.

But FSK features a <global>Timer
Like used here in Fskin.dialog.autoClick taken from fskin.so
Spoiler:
Quote:
this.Fskin.dialog.autoClick = function (name) {
var button;
if (name in this.sandbox) {
button = this.sandbox[name];
if (button.visible && button.active) {
button.state = 3;
button.invalidate();
this.autoClickTimer = new <global>.Timer();
this.autoClickTimer.onCallback = this.autoClickTimerCallback;
this.autoClickTimer.target = button;
this.autoClickTimer.schedule(250);
}
}
};
this.Fskin.dialog.autoClickTimerCallback = function (delta) {
var button;
button = this.target;
button.state = 1;
button.invalidate();
button.select();
};

I havn't check yet, if Timer is scriptable or had to be addressed in compiled code.
Maybe this can set you on track.
PS: <global> has not to be typed in!
PPS: take care to cancel() and delete the Timer properly, as a active Timer may prevent suspend-mode and thus drain the battery.

Last edited by Mark Nord; 01-13-2011 at 02:29 PM.
Mark Nord is offline   Reply With Quote