@marmarta So you mean, that when the window(ex, firefox) looses focus to focus on the new one(my program), I could record what that one is?