Check Phases in battle

Hi everyone, i have Hud Maker Ultra ( not pro ) and i want to check if the emerge message was clicked before making the battle hud appear.
I want then that it disappear when i press attack or skills and the windows with choosing target or skills pops up, in order to not overlap with the battle hud beneath.
I can insert code conditions inside the window hud component and i found something like BattleMagaer.startInput function, but i am n00b and i dunno how to check if it is true ( Player choosing action ) so please i need help.
If you have a script list that i can look at for battle manager phases and flows checks, please link it to me.

Thanks in advance.
JavaScript:
BattleManager._phase

Will return BattleManager's phase. Something like this:

JavaScript:
if (BattleManager._phase = 'input') {
console.log('BattleManager phase: input');
}

BattleManager also has the isInputting() method which may apply to your situation:

JavaScript:
if (BattleManager.isInputting()) {
console.log('BattleManager.isInputting() returns true');
}

For the windows, something like:

JavaScript:
const skillWindow = SceneManager._scene._skillWindow
if (skillWindow.isOpenAndActive()) {
  console.log('the skill window is open')
}

Might work for you.

I'm not familiar with Hud Maker, so you will need to experiment.
@Kenen First of all thanks for your great help, it is hugely appreciated.
I am n00b with JS and i am studying it, what i understood for now is that console.log is used as a cout << to print text with C++.

What i don't understand is if the console.log should make a " show Text " appear or if it appear in the debug console text, if is the first text, the text is not showing in battle, if is the second how can i open the debug console on MZ?

I am sorry if my ultra n00b question bother someone but i am really starting with JS and RPG Maker.

Original thread: https://forums.rpgmakerweb.com/threads/check-phases-in-battle.162032/