Dialog input plugin
https://forums.rpgmakerweb.com/index.php?threads/keyboard-input-dialog.66908/
I want
after open dialog input , auto click the Cancel button after 10 seconds.
I added this code
if(SceneManager._scene instanceof Scene_InputDialog) {
setTimeout(function () {document.getElementById("inputDialog-CancelBtn").click();}, 10000);
}
everything works fine but it will cause the error if I click Ok button during the 10 seconds.
Uncaught Type error: Cannot read propety 'click' of null
How should I edit the code I added so that during the 10 seconds, if the OK button is clicked, don't auto click Cancel button anymore
Any help is appreciated
https://forums.rpgmakerweb.com/index.php?threads/keyboard-input-dialog.66908/
I want
after open dialog input , auto click the Cancel button after 10 seconds.
I added this code
if(SceneManager._scene instanceof Scene_InputDialog) {
setTimeout(function () {document.getElementById("inputDialog-CancelBtn").click();}, 10000);
}
everything works fine but it will cause the error if I click Ok button during the 10 seconds.
Uncaught Type error: Cannot read propety 'click' of null
How should I edit the code I added so that during the 10 seconds, if the OK button is clicked, don't auto click Cancel button anymore
Any help is appreciated