get_foused_window
get_foused_window(); - this function is used to get XHEWindowInterface interface to the window that has focus. (available from version 7.0.39)
After testing, the function returns the result of its work to the script :
window interface – XHEWindowInterface interface to the specified window.