Apr-07-2021, 05:28 PM
If you mean the window "title", that is probably queryable. The distinction is that apps may not put the information you expect into the title. You only get what happens to be there.
I haven't used them (and can't test windows code for a bit), but this StackOverflow post has several suggestions.
The simplest from there would seem to be to install "pywin32" and then try
I haven't used them (and can't test windows code for a bit), but this StackOverflow post has several suggestions.
The simplest from there would seem to be to install "pywin32" and then try
from win32gui import GetWindowText, GetForegroundWindow print(GetWindowText(GetForegroundWindow()))