Conditional branch check if player is on message window

Can someone tell me the script for this? Thank you!
What are you trying to do? If the message window is open, event commands following the Show Text will not be run until the window is closed.
What are you trying to do? If the message window is open, event commands following the Show Text will not be run until the window is closed.
A group chat, you know, like the Bravely Default one, you press a button and then the conversation starts showing up. The next 2 images its how its suposed to look in normal conditions
Spoiler
Captura de pantalla (62).png
Captura de pantalla (65).png
But if you talk to someone and press shift...
Spoiler
Captura de pantalla (68).png
I tried using SRD Wait options plugin, which let me make a wait for finish the last message, but if there's something in between, like some wait for frames, it will start doing the chat group, and when that wait finishes, the event message will continue and stop the group chat from being played. Here's the event for the chat group:
Spoiler
Captura de pantalla (66).png
Captura de pantalla (67).png
If you don't understand something, tell me. I want the event to wait for the event to finish or a conditional branch that detects there's an event running. Hope you can help me Shaz

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-check-if-player-is-on-message-window.95848/