Run a common event before and after every battle?

I have this thing going where the windowskin changes color based on which actor is leading the party. Unfortunately, the battle HUD I'm using doesn't change color with the windows. So, instead, I'd like to make it so that message boxes that appear in battle (in-fight conversations happen with some special enemies) match the HUD.

I'd like to make it so that the window changes color just before the battle, and then changes back to the appropriate color afterward. However, even though I can find scripts and such for after-battle common events, I can't for the life of me find anything about pre-battle common events.

Has anybody got any recommendations? I have a feeling that I'm missing something super-simple.
'Scripts' is where people post scripts they have written to share with others.

Moved to: RGSS3 Script Requests
Yikes, sorry.
If you're using evented battles, just call the common event before and after the battle processing command.

If you're using random encounters, then you need a script to run a common event before battle (Tsukihime has one on her blog).
As for running a common event after battle, do the following:
1) make a common event parallel process conditioned on a new switch "after battle", but your commands in there but as the last command make it control switch "after battle" OFF, so that the common event runs only once
2) in every troop, make a troop event to run on the first battleturn to activate that switch.

Since parallel processes only work on the map, it will not activate before the battle ended even if the switch to activate it is controlled ON on the first battleturn.
If you're using evented battles, just call the common event before and after the battle processing command.

If you're using random encounters, then you need a script to run a common event before battle (Tsukihime has one on her blog).
As for running a common event after battle, do the following:
1) make a common event parallel process conditioned on a new switch "after battle", but your commands in there but as the last command make it control switch "after battle" OFF, so that the common event runs only once
2) in every troop, make a troop event to run on the first battleturn to activate that switch.

Since parallel processes only work on the map, it will not activate before the battle ended even if the switch to activate it is controlled ON on the first battleturn.
I'm sorry, which Tsukihime script is that? Is it Common Event Triggers? The link to the dropbox on the site is broken. 😔
Thank you!
EDIT: Wait, I managed to find it.

Original thread: https://forums.rpgmakerweb.com/threads/run-a-common-event-before-and-after-every-battle.76867/