[Solved]Prevent battle window from popping up

I am attempting to prevent the player battle window and all of its functions from even popping up to have my battle sequence instead progressed by events only. User Joewoof has provided this simple script to be placed on turn 0 of the troop event line in an attempt to prevent the battle windows from popping up


Scene_Battle._statusWindow.close();
Scene_Battle._partyCommandWindow.close();
Scene_Battle._actorCommandWindow.close();


but it returns the errors "cannot read property 'close' of undefined" for the first choice and "cannot set property 'visible' of undefined"  when changing ".close();" to ".visible = false;" so I am now posting the question here as I now have a possible script to work with.


battle system.png


Image for reference of what I am trying to remove.
Haha, you sure are impatient. I was making a plugin for you. I just tested it and it works now. Here you go:


https://www.dropbox.com/s/op5gzpbl7br730t/DAX_HideBattleWindow.js?dl=0


Be sure to credit. I allow commercial use.
Haha, you sure are impatient. I was making a plugin for you. I just tested it and it works now. Here you go:


https://www.dropbox.com/s/op5gzpbl7br730t/DAX_HideBattleWindow.js?dl=0


Be sure to credit. I allow commercial use.

Holy cow bro I had no idea you were actually gonna come back, and with an entire plugin 😀, I just tried it myself and it works wonderfully, your a genius! Sorry for not believing, I was getting desperate. I will totally put you in the credits and let you know when the game is finished, thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/solved-prevent-battle-window-from-popping-up.58235/