This python script is intended to check for the currently selected window. It will output the focused window only when the window is different from the last known window.
Only works on windows due to using windows libraries.
This was made to diagnose which applications were stealing focus while gaming.
install the following packages:
pywin32