I want it to automatically press the ok button after the window is opened for 20 seconds. I don't know how exactly to do this. code is:
window_NameInput.prototype.processHandling = function() {
if (this.isOpen() && this.active) {
if (Input.isRepeated('ok')) {
this.processOk();
}
}
};
What I tried:
window_NameInput.prototype.processHandling = function() {
if (this.isOpen() && this.active) {
{ setTimeout(function () if (Input.isRepeated('ok')) {
this.processOk();
} , 20000); }
}
};
Edit:
I actually decided to use this code below. I want to call ok handler after window has been opened for 20 seconds.
Window_NameInput.prototype.processHandling = function() {
if (this.isOpen() && this.active) {
setTimeout(function(){
this.callOkHandler();
},2000);
}
};
But I got uncaught type error this.callokhandler is not a function
Any help is appreciated Thanks in advance