Are things (like clicking a button) happening outside a GUI also recognized as an event
? For instance, Opening or closing an excel file.
Asked
Active
Viewed 146 times
0

Emad
- 155
- 1
- 7
-
It is extremely unlikely and I was not able to find anything resembling this in the PySimpleGUI reference. Detecting an opening of an excel file would probably involve looking at all currently open windows and trying to make sense of that. Probably not a task that can be accomplished with PySimpleGUI alone. – IsawU Mar 12 '21 at 09:43
-
@IsawU Closing is the same? – Emad Mar 12 '21 at 10:25
-
Yes. In that case you would be able to detect that the window no longer exists. On Windows there is a command `tasklist /v` the `/v` verbose output lists the window titles. Might be a worthy startingpoint + the command output can be easily retreived from a python script. Other operating systems will most likely have something like this too. https://stackoverflow.com/questions/15491288/get-a-list-of-all-open-windows-from-the-command-line – IsawU Mar 12 '21 at 19:49