For example, if the currently focused process is Microsoft Word, and I have opened in it a document called myFile.doc, I know how to get the window text (in this case could be "myFile.doc - Word") and I know how to get the process name ("winword") or the process description ("Microsoft Word").
Is there any way to get only the name of the file opened in the currently focused process? It can be any process.
I know that I can parse the window text and get the opened file, but for example, in spanish version of Notepad the window text format is different ("myFile.txt: Bloc de notas").
I think that maybe there is a way to get aditional details about the currently focused process.
Thanks in advance!