MZ How to hide "Actor Command" window when the "Battle Enemy" window is open?

I'm very new to javascript, what line of code could I used to hide the "Window_ActorCommand" window (attack, defend, skill) when the "Window_BattleEnemy" (selecting an enemy to attack) window is open? Thanks.
you could set the ActorCommand window's visible property to false within the battle scene's startEnemySelection() function and then set it back to true within onEnemyCancel()
you could set the ActorCommand window's visible property to false within the battle scene's startEnemySelection() function and then set it back to true within onEnemyCancel()
Thank you for your help, how would I write that?
Thank you for your help, how would I write that?
you'd find how the actor window is referenced within the scene, find the functions mentioned, and do the things mentioned using the reference found.

Spoiler: plugin
Code:
Scene_Battle.prototype.startEnemySelection = function() {
    this._actorCommandWindow.hide(); //function that sets the visible property to false. could be done manually
    this._enemyWindow.refresh();
    this._enemyWindow.show();
    this._enemyWindow.select(0);
    this._enemyWindow.activate();
    this._statusWindow.hide();
};

Scene_Battle.prototype.onEnemyCancel = function() {
    this._enemyWindow.hide();
    this._actorCommandWindow.show(); //sets the property to true so that canceling returns the menu
    switch (this._actorCommandWindow.currentSymbol()) {
        case "attack":
            this._statusWindow.show();
            this._actorCommandWindow.activate();
            break;
        case "skill":
            this._skillWindow.show();
            this._skillWindow.activate();
            break;
        case "item":
            this._itemWindow.show();
            this._itemWindow.activate();
            break;
    }
};

Original thread: https://forums.rpgmakerweb.com/threads/how-to-hide-actor-command-window-when-the-battle-enemy-window-is-open.174612/